You manage 4 buildings, each of which has 3 floors, each of which consists of 10 rooms. Write a program which reads a sequence of tenant/leaver notices, and reports the number of tenants for each room.  For each notice, you are given four integers b, f, r and v which represent that v persons entered to room r of fth floor at building b. If v is negative, it means that −v persons left.  Assume that initially no person lives in the building.
nyukyo = [[[0 for i in range(10)] for m in range(3)] for n in range(4)]
num = int(input())
for i in range(num):
    handan = input().split()
    handan = list(map(int, handan))
    nyukyo[handan[0]-1][handan[1]-1][handan[2]-1] += handan[3]

for m in nyukyo[0][0]:
    print(m, end=" ")
for m in nyukyo[0][1]:
    print(m, end=" ")
for m in nyukyo[0][2]:
    print(m, end=" ")
print("#"*20)
for m in nyukyo[1][0]:
    print(m, end=" ")
for m in nyukyo[1][1]:
    print(m, end=" ")
for m in nyukyo[1][2]:
    print(m, end=" ")
print("#"*20)
for m in nyukyo[2][0]:
    print(m, end=" ")
for m in nyukyo[2][1]:
    print(m, end=" ")
for m in nyukyo[2][2]:
    print(m, end=" ")
print("#"*20)
for m in nyukyo[3][0]:
    print(m, end=" ")
for m in nyukyo[3][1]:
    print(m, end=" ")
for m in nyukyo[3][2]:
    print(m, end=" ")
nyukyo = [[[0 for i in range(10)] for m in range(3)] for n in range(4)]
num = int(input())
for i in range(num):
    handan = input().split()
    handan = list(map(int, handan))
    nyukyo[handan[0]-1][handan[1]-1][handan[2]-1] += handan[3]

for m in nyukyo[0]:
    t = list(map(str, m))
    print(" "+" ".join(t))
print("#"*20)
for m in nyukyo[1]:
    t = list(map(str, m))
    print(" "+" ".join(t))
print("#"*20)
for m in nyukyo[2]:
    t = list(map(str, m))
    print(" "+" ".join(t))
print("#"*20)
for m in nyukyo[3]:
    t = list(map(str, m))
    print(" "+" ".join(t))