Var s:string;
    a:array[1..200]of string;
    i,j,k,n:longint;
Begin
  ReadLn(s);
  s:=s+' ';
  for i:=1 to length(s)do
    if pos(' ',s[i])<>0 then begin
                             k:=k+1;
                             a[k]:=copy(s,1,i);
                             delete(s,1,i);
                             end;
  for i:=k downto 1 do write(a[i]);
End.