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:
blk = 0

def print_blk(indent):
	global blk
	line = raw_input()
	line = line.strip()
	line = line.replace("congats!", "congrats!")
	word = line.split()[0]
	if (word != 'end' and word != 'elsif' and word != 'else'):
		if word == "if" or word == "def" or word == 'class':
			lin_tmp = " " * (indent) + line
			print lin_tmp
			indent += 1
			blk += 1
			print_blk(indent)
		else:
			lin_tmp = " " * (indent) + line
			print lin_tmp
			print_blk(indent)
	else: 
		indent -= 1
		lin_tmp = " " * (indent) + line
		print lin_tmp
		if word != "end" : indent += 1
		if word == "end":
			blk -=1
			if blk == 0:exit(0)
		print_blk(indent)
indent = 0
print_blk(indent)