Program HOC24;
var st,s: string;
a: array[1..255] of string;
d,i,n: integer;
begin
readln(s);
s:=s+' ';
while length(s)<>0 do
begin
st:=copy(s,1,pos(' ',s)-1);
n:=n+1;
a[n]:=st;
delete(s,1,pos(' ',s));
end;
for i:= n downto 1 do write(a[i],' ');
readln
end.