Problem: Write your program in Ruby which takes an un-indented Ruby code as string and outputs the indented Ruby code as string.

Input Format
A string which is un-indented Ruby code

Output Format
A string which is indented Ruby code

SAMPLE INPUT
class YabbaDabbaDoo
        def foo
        if foo == 42
        puts 'world hello'
          elsif foo == 24
          puts 'bk201'
        else
        puts 'congrats!'
          end
  end
end

SAMPLE OUTPUT
class YabbaDabbaDoo
 def foo
  if foo == 42
   puts 'world hello'
  elsif foo == 24
   puts 'bk201'
  else
   puts 'congrats!'
  end
 end
end

Explanation

Indentation is of 2 spaces.

Solution (in PYTHON):

Solution:
a = ""
st = ""
g = 0;
while(a!="end"):
    a = raw_input()
    i = 0
    n = len(a)
    while(a[i]==" "):
        i = i + 1
    b = a[i:n]
    c = map(str,b.split(" "))
    if "class" in c:
        print b
    elif "def" in c:
        st = st + " "
        print st + b
    elif "if" in c:
        st = st + " "
        print st + b
    elif "elsif" in c:
        st = st[:-1]
        print st + b
    elif "else" in c:
        st = st[:-1]
        print st + b
    elif "puts" in c:
        st = st + " "
    	if "'congats!'" in c:
    		print st + "puts 'congrats!'"
        else:
        	print st + b
    elif "end" in c:
        st = st[:-1]
        print st +"end"