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.
N = int(input())
a = [map(int,input().split()) for i in range(N)]
arr = [[[0 for i3 in range(10)] for i2 in range(3)] for i1 in range(4)]
for b,f,r,v in a:
    arr[b-1][f-1][r-1] += v
i=0
for bl in arr:
    for fl in bl:
        print(' '.join(map(str,fl)))
    if i != len(arr):
        print('#'*20)
N = int(input())
a = [map(int,input().split()) for i in range(N)]
arr = [[[0 for i3 in range(10)] for i2 in range(3)] for i1 in range(4)]
for b,f,r,v in a:
    arr[b-1][f-1][r-1] += v
i=1
for bl in arr:
    for fl in bl:
        print(' '+' '.join(map(str,fl)))
    if i != len(arr):
        print('#'*20)
    i += 1