f=function(s,l)l=#s/2+.1 return"{"..(l<1 and s or f(s:sub(1,l))..f(s:sub(l+1))).."}"end print(f(io.read()))