Перевести код с Pascal на var
s,sn:string;
t,p:text;
i: integer;
begin
assign(t,'C:\in.txt');
assign(p,'C:\out.txt');
reset(t);
rewrite(p);
while not (Eof(t)) do
begin
readln(t,s);
sn:='';
for i:=1 to length(s) do
if s[i] in ['0','1'..'8','9'] then
sn:=sn+s[i]+s[i] else sn:=sn+s[i];
writeln(p,sn);
end;
close(t);
close(p);
end.