def r(s):x=len(s)-1;l=x/2+1;return'{'+(x and r(s[:l])+r(s[l:])or s)+'}' print r(raw_input())