const N=5;
var a:array [1..N] of integer;
i:integer;
s:string;
BEGIN
for i:=1 to N do
read(a[i]);
s:='';
for i:=N downto 1 do begin
while a[i]>0 do begin
s:=s+a[i] mod 10;
a[i]:=a[i] div 10;
end;
write(s,' ');
end.
const N=5;
var a:array [1..N] of integer;
i:integer;
s:string;
BEGIN
for i:=1 to N do
read(a[i]);
s:='';
for i:=N downto 1 do begin
while a[i]>0 do begin
s:=s+a[i] mod 10;
a[i]:=a[i] div 10;
end;
write(s,' ');
s:='';
end;
end.