Draw a tiled cube of any size Draw a tiled cube of any size, in ASCII art.

You will be given three numbers a, b and c, and the program should output an a*b*c sized cube.

Examples

3 3 3 ->

    ____ ____ ____
  /____/____/____/|
 /____/____/____/||
/____/____/____/|||
|____|____|____|||/
|____|____|____||/
|____|____|____|/


5 2 3 -> 

    ____ ____ ____ ____ ____
  /____/____/____/____/____/|
 /____/____/____/____/____/||
/____/____/____/____/____/||/
|____|____|____|____|____||/
|____|____|____|____|____|/


4 6 5 ->

      ____ ____ ____ ____ 
    /____/____/____/____/|
   /____/____/____/____/||
  /____/____/____/____/|||
 /____/____/____/____/||||
/____/____/____/____/|||||
|____|____|____|____||||||
|____|____|____|____|||||/
|____|____|____|____||||/
|____|____|____|____|||/
|____|____|____|____||/
|____|____|____|____|/


Shortest code wins.
Python, 145 chars

a,b,c=map(int,raw_input().split())
for i in range(b+c+1):print(' '*(c-i)+((' /|'[(i&gt;c)+(i&gt;0)]+'_'*4)*(a+1))[:-4]+('|'*(b+c-i))[:b]+'/')[:5*a+c+1]

$ echo "5 6 3" | ./cube.py
    ____ ____ ____ ____ ____
  /____/____/____/____/____/|
 /____/____/____/____/____/||
/____/____/____/____/____/|||
|____|____|____|____|____||||
|____|____|____|____|____||||
|____|____|____|____|____||||
|____|____|____|____|____|||/
|____|____|____|____|____||/
|____|____|____|____|____|/