Var
f1,f2:text;
s:string;
begin
assign(f1,'d:\f1.txt');
reset(f1);
read(f1,s);
close(f1);
assign(f2,'d:\f2.txt');
rewrite(f2);
write(f2,s);
write(f2,ReverseString(s));
close(f2);
assign(f2,'d:\f2.txt');
reset(f2);
read(f2,s);
writeln(s);
close(f2);
end.