def h(s):l=len(s)+1;return"{"+(s if(l<3)else h(s[:l/2])+h(s[l/2:]))+"}" print h(raw_input())