uses crt;
var
    a,i:char;
    z:boolean;
 begin
{repeat}
 clrscr;
 i:='0';
 z:=true;

 a:=readkey;
 write(a:2);
 while (a<>'.') and (i<='9') and z do
 begin
 if a<>i then z:=false;
 i:=chr(ord(i)+1);
 a:=readkey;
 write(a:2);
 end;

if (i>'9')and(a<>'.') then z:=false;
writeln;
writeln(z);
readln;

{writeln('  repeat? ');
until readkey='n'; }
end.