var s:string;l,i,j:word;begin readln(s);if s[1]='l'then s:='long';l:=length(s);for i:=0to 2pow l-1 do begin for j:=1to l do if i and 2pow(l-j)>0 then write(s[j]);writeln;end;end.
Note that non-ascii characters in the above source code will be escaped (such as \x9f).