uses crt;
const cf=['0'..'9'];
var f,g:text;
s:string;
i:byte;
begin
clrscr;
assign(f,'file1.txt');
reset(f);
assign(g,'file2.doc');
rewrite(g);
while not eof(f) do
begin
readln(f,s);
for i:=length(s) downto 1 do
if(s[i] in cf)and not (s[i-1] in cf)
and ((not (s[i+1] in cf))or(i=length(s)))
then insert(' ',s,i);
writeln(g,s);
end;
close(f);
close(g);
write('Fail perepisan!');
readln
end.