J-Language


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

Following is the formatting contract of J-Language code: 1)J-Language is consisted of multiple blocks 2)Each block begins with { and ends with }, both of them occupy a single line 3)Block can nested into other block, the nested { is 4 spaces right to the outer {, the nested } is 4 spaces left to the outer }. 4)Each block may contain one or multiple statements 5)Each statement starts with % and ends with # 6)Each statement occupies just one line 7)Each statement is 4 spaces right to the {

Input

A valid J-Language code. Processing to the end of file.

Output

Print the formatted code.

Sample

Input

{{%var a=1#}  %var b=a#%printf(“b=”,b)# }
{}

Output

{
{
            %var a=1#
}
%var b=a#
%printf(“b=”,b)#
}
{
}

Comments

There are no comments at the moment.