uses crt;
var
q,x,r,b,e,e1:integer;
a,s:array[1..32274] of char;
i,o:file of char;
begin
b:=1;e:=1;
assign(i,'Input.txt');
assign(o,'Output.txt');
reset(i);
rewrite(o);
while not eof(i) do begin
read(i,a[q+1]);
q:=q+1;
end;
while x#0) and (a[x+1]<>#13) and (a[x+1]<>#10) and
(a[x+1]<>' ') and (a[x+1]<>',') and (a[x+1]<>'.') and
(a[x+1]<>'"') and (a[x+1]<>'(') and (a[x+1]<>')')
and (a[x+1]<>'1') and (a[x+1]<>'2') and (a[x+1]<>'3')
and (a[x+1]<>'4') and (a[x+1]<>'5') and (a[x+1]<>'6')
and (a[x+1]<>'7') and (a[x+1]<>'8') and (a[x+1]<>'9')
and (a[x+1]<>'0') and (a[x+1]<>#9) and (a[x+1]<>'!')
and (a[x+1]<>':') and (a[x+1]<>';') and (a[x+1]<>'?')
and (a[x+1]<>'+') and (a[x+1]<>'-') and (a[x+1]<>'=')
and (a[x+1]<>'_') and (a[x+1]<>'@') and (a[x+1]<>'#')
and (a[x+1]<>'$') and (a[x+1]<>'%') and (a[x+1]<>'^')
and (a[x+1]<>'&') and (a[x+1]<>'*') and (a[x+1]<>'\')
and (a[x+1]<>'|') and (a[x+1]<>'`') and (a[x+1]<>'~')
and (a[x+1]<>'[') and (a[x+1]<>']') and (a[x+1]<>'<')
and (a[x+1]<>'>') and (a[x+1]<>'/')
do x:=x+1;
e:=x;
for r:=b to e do s[b+e-r]:=a[r];
s[e+1]:=a[x+1];
b:=e+2;
x:=x+1;
end;
for r:=1 to q do write(o,s[r]);
readkey;
end.