13633 - Indentation   

Description

You're now in a bad mood since you quarreled with your best friend. 

Recently, your best friend keeps convince you that using semicolons for indentation is the best way to code in C. He claimed that semicolons are beautiful, so you'll be in a good mood if you put a lot of semicolons in your code. What's more, you'll never forget to add a semicolon at the end of the line anymore. You think that your friend is insane and you have a severe headache every time you read his code. 

Therefore, you decide to get rid of this terrible habit for your friend: now your friend is taking a nap, and you are going to open his computer, find his code files, and turn all of his code to space indentation.

Given lines of compilable C code. Currently, the code is indented by semicolons, and now you want to rewrite this code using spaces for indentation.

In other words, you are going to do the following operations:

  • For every single line, turned every prefix semicolon into spaces.
  • Add a semicolon at the end of every single line, except for the lines mentioned below: 
    • Header file included. e.g. #include <stdio.h>
    • A line that contains '{' at the very end of it.
    • A line that contains only semicolons and a single '}' at the end.

          It is guaranteed that there are no other situations that don't need a semicolon at the end of the line.

Input

Lines of compilable C code, terminated by EOF.

Output

The code using space for indentation.

Sample Input  Download

Sample Output  Download

Tags

FlyHighHigh



Discuss