var s:string;i,j:comp;begin read(s);for i:=-length(s)to-1do for j:=-i to length(s)do writeln(s[-i..j])end.