using C=System.Console;class X{static string H(string s){int x=s.Length;return(x>1)?"{"+H(s.Remove(++x/2))+H(s.Remove(0,x/2))+"}":"{"+s+"}";}static void Main(){C.Write(H(C.ReadLine()));}}