Automatic house-builder Automatic house building nanobots have been fabricated, and it's your job to code them.

Here is the house created by input 7 4 2

  /-----/|
 /     / |
|-----|  |
|     |  |
|     | /
|_____|/


The input is a string containing the house's dimensions.

7 is the width.

|_____|

---7---


4 is the height.

|
|
|
|


2 is the depth

 / 
/


Given this input, can you create the house?

Your code must be as small as possible so that it can fit in the robots.

Notes

The smallest dimensions you will be given as input are 3 2 2. Your program can do anything with dimensions that are smaller than 3 2 2.

Testcases

3 2 10

          /-/|
         / / |
        / / /
       / / /
      / / /
     / / /
    / / /
   / / /
  / / /
 / / /
|-| /
|_|/
Python 2, 128 bytes

w,h,d=input();i=d
while-i&lt;h:c='|/'[i&gt;0];print' '*i+c+'- _'[(d&gt;i!=0)+(h+i&lt;2)]*(w-2)+c+' '*min(d-i,h-1,w+1,h-1+i)+'/|'[d-i&lt;h];i-=1

Prints row by row. The row indices i count down from d to -h+1.