## MTV Cribs is back!
![](https://s-media-cache-ak0.pinimg.com/236x/1b/cf/f4/1bcff4f4621644461103576e40bde4ed.jpg)
_If you haven't solved it already I recommend trying [this kata](https://www.codewars.com/kata/5834a44e44ff289b5a000075) first._
## Task
Given `n` representing the number of floors build a penthouse like this:
```
        ___
       /___\                
      /_____\
      |  _  |     1 floor
      |_|_|_|
       _____
      /_____\
     /_______\
    /_________\             
   /___________\
   |           |
   |    ___    |     2 floors
   |   |   |   |
   |___|___|___|
      _______
     /_______\
    /_________\
   /___________\
  /_____________\
 /_______________\
/_________________\
|                 |         3 floors
|                 |
|      _____      |
|     |     |     |
|     |     |     |
|_____|_____|_____|
```
**Note:** whitespace should be preserved on both sides of the roof. No invalid input tests.
Good luck!
def my_crib(n):
    wide = 4 + 3 + 6 * (n - 1)
    door = 2 + n - 1
    roof = 3 + 2 * (n - 1)
    r = '{0}{1}{0}\n'.format(' ' * (wide // 2 - n), '_' * (3 + 2 * (n - 1)))
    for i in range(1, roof):
        r += '{0}/{1}\\{0}\n'.format(' ' * (wide // 2 - n - i), '_' * (3 + 2 * (n - 1) + 2 * (i -1)))
    for i in range(roof - 1 - door):
        r += '|{}|\n'.format(' ' * (wide - 2))
    r += '|{0}{1}{0}|\n'.format(' ' * ((wide - 1) // 3), '_' * (1 + 2 * (n - 1)))
    for i in range(1, door - 1):            
        r += '|{0}|{0}|{0}|\n'.format(' ' * ((wide - 2) // 3))
    return r + '|{0}|{0}|{0}|'.format('_' * ((wide - 2) // 3))


def my_crib(n):
    wide = 4 + 3 + 6 * (n - 1)
    door = 2 + n - 1
    roof = 3 + 2 * (n - 1)
    r = '{0}{1}{0}\n'.format(' ' * (wide // 2 - n), '_' * (3 + 2 * (n - 1)))
    for i in range(1, roof):
        r += '{0}/{1}\\{0}\n'.format(' ' * (wide // 2 - n - i), '_' * (3 + 2 * (n - 1) + 2 * (i -1)))
    for i in range(roof - 1 - door):
        r += '|{}|\n'.format(' ' * (wide - 2))
    r += '|{0}{1}{0}|\n'.format(' ' * ((wide - 1) // 3), '_' * (1 + 2 * (n - 1)))
    for i in range(1, door - 1):            
        r += '|{0}|{0}|{0}|\n'.format(' ' * ((wide - 2) // 3))
    return r + '|{0}|{0}|{0}|'.format('_' * ((wide - 2) // 3))

