function h(x){var l=-~x.length/2;return"{"+(l>1?h(x.slice(0,l))+h(x.slice(l)):x)+"}"}print(h(readline()))