## Task

Given `n` representing the number of floors build a beautiful multi-million dollar mansions like the ones in the example below:

```
     /\
    /  \
   /    \
  /______\  number of floors 3
  |      |
  |      |
  |______|

     /\
    /  \
   /____\
   |    |   2 floors
   |____|

     /\
    /__\    1 floor
    |__|
```

**Note:** whitespace should be preserved on both sides of the roof. Number of floors will go up to 30. There will be no tests with invalid input.

If you manage to complete it, you can try a harder version [here](https://www.codewars.com/kata/58360d112fb0ba255300008b).

Good luck!

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

def _disabled_input(*args, **kwargs):
    raise RuntimeError("input() is disabled in callable mode")
builtins.input = _disabled_input

ns = {"__name__": "__judge__"}  # prevent if __name__ == "__main__" blocks
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'class House(object):\n    roofleft, roofright = \'/\', \'\\\\\'\n    wall = \'|\'\n    bottom = \'_\'\n    \n    def __init__(self, floors):\n        self.floors = floors\n        \n    def __new__(cls, floors):\n        a = super(House, cls).__new__(cls)\n        a.__init__(floors)\n        return str(a)\n        \n    @property\n    def width(self):\n        return self.floors * 2 + 2\n        \n    @property\n    def height(self):\n        return self.floors * 2 + 1\n        \n    @property\n    def roofparts(self):\n        return list(range(self.floors))\n        \n    @property\n    def gutterparts(self):\n        return list(range(max(self.roofparts) + 1, max(self.roofparts) + 2))\n        \n    @property\n    def floorparts(self):\n        return list(range(max(self.gutterparts) + 1, self.height - 1))\n        \n    @property\n    def groundparts(self):\n        return list(range(self.height -1, self.height))\n    \n    def genpart(self, index):\n        if index in self.roofparts:\n            return self.genroof(index, outerfill=" ", innerfill=" ")\n        if index in self.gutterparts:\n            return self.genroof(index, outerfill="", innerfill="_")\n        if index in self.floorparts:\n            return self.genfloor(index, outerfill="", innerfill=" ")\n        if index in self.groundparts:\n            return self.genfloor(index, outerfill="", innerfill="_")\n            \n    def genroof(self, index, innerfill, outerfill):\n        margin = "{:{outerfill}^{width}}".format("", outerfill=outerfill, width=(self.floors - index))\n        roofpart = "{margin}{roofleft}{centerfill}{roofright}{margin}".format(\n            margin=margin,\n            roofleft=self.roofleft,\n            roofright=self.roofright,\n            centerfill=innerfill * 2 * index)\n        return roofpart\n        \n    def genfloor(self, index, innerfill, outerfill):\n        margin = "{outerfill:{innerfill}^{width}}".format(innerfill=innerfill, outerfill=outerfill, width=self.width)\n        roofpart = "{wall}{centerfill}{wall}".format(\n            wall=self.wall,\n            centerfill=innerfill * (self.width - 2))\n        return roofpart\n            \n    def draw(self):\n        lines = []\n        for index in range(self.height):\n            part = self.genpart(index)\n            if not part:\n                part = "X" * self.width\n            lines.append(part)\n        return \'\\n\'.join(lines)\n    \n    def bounding_box(self):\n        lines = []\n        for row in range(self.height):\n            lines.append(\'X\' * self.width)\n        return \'\\n\'.join(lines)\n        \n    @property\n    def __name__(self):\n        return [objname for objname,oid in list(globals().items()) if id(oid)==id(self)]\n        \n    def allnames(self):\n        results = [n for n, v in list(globals().items()) if v is arg]\n        return results[0] if len(results) is 1 else results if results else None\n    \n    def __repr__(self):\n        #return \'House({})\'.format(self.floors)\n        return repr(self.draw())\n        \n    def __str__(self):\n        return self.draw()\n    \n    def describe(self):\n        return \'a bVectorian era {} story home called "{}" {{ signified as {}, identified as {} }}\'.format(self.floors, self.__name__, repr(self), id(self))\n        \nmy_crib = House\n\ndef testings():\n    commonhouse = House(1)\n    middleclasshouse = House(2)\n    ritzyhouse = House(3)\n    bigscaryhouse = House(4)\n    cribs = [commonhouse,middleclasshouse,ritzyhouse,bigscaryhouse]\n    for crib in cribs:\n        print(crib)\n        print(crib.draw())\n        print(crib.roofparts, crib.gutterparts, crib.floorparts, crib.groundparts)\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

_target = None
_fn_name = 'my_crib'
if _fn_name:
    if "Solution" in ns:
        try:
            _obj = ns["Solution"]()
            if hasattr(_obj, _fn_name):
                _target = getattr(_obj, _fn_name)
        except Exception:
            _target = None
    if _target is None and _fn_name in ns and callable(ns[_fn_name]):
        _target = ns[_fn_name]
# Fallback: if there's exactly one user-defined function, use it
if _target is None:
    _cands = [v for k, v in ns.items() if callable(v) and getattr(v, "__module__", "") in ("__judge__", "__main__")]
    _user_funcs = [c for c in _cands if getattr(c, "__name__", "").startswith("_") is False]
    if len(_user_funcs) == 1:
        _target = _user_funcs[0]
if _target is None:
    raise RuntimeError(f"Could not resolve callable '{_fn_name}'")

_raw = sys.stdin.read().strip()
if _raw:
    _parsed = json.loads(_raw)
    if isinstance(_parsed, dict):
        _kwargs = _parsed.get("kwargs", {})
        _args = _parsed.get("args", [])
    else:
        _args, _kwargs = _parsed, {}
else:
    _args, _kwargs = [], {}
if not isinstance(_args, (list, tuple)):
    _args = [_args]
_res = _target(*_args, **_kwargs)
try:
    sys.stdout.write(repr(_res) + "\n")
except Exception:
    pass

```

Measured memory_bytes: 8854