Problem:
Official House

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.

Input

In the first line, the number of notices n is given. In the following n lines, a set of four integers b, f, r and v which represents ith notice is given in a line.

Output

For each building, print the information of 1st, 2nd and 3rd floor in this order. For each floor information, print the number of tenants of 1st, 2nd, .. and 10th room in this order. Print a single space character before the number of tenants. Print "####################" (20 '#') between buildings.

Constraints

No incorrect building, floor and room numbers are given.

0 ≤ the number of tenants during the management ≤ 9

Sample Input

3
1 1 3 8
3 2 2 7
4 3 8 1

Sample Output

0 0 8 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
####################
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
####################
0 0 0 0 0 0 0 0 0 0
0 7 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
####################
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0

Solution in Ruby (judge verdict: WA: Presentation Error)

n = gets.to_i
f11 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f12 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f13 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f21 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f22 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f23 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f31 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f32 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f33 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f41 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f42 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
f43 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
b1 = [f11,f12,f13]
b2 = [f21,f22,f23]
b3 = [f31,f32,f33]
b4 = [f41,f42,f43]
bf = [b1,b2,b3,b4]

n.times do
    x = gets()
    x = x.split

    b = x[0].to_i - 1
    f = x[1].to_i - 1
    r = x[2].to_i - 1
    v = x[3].to_i 
    if 0 <= b && b <= 4 && 0 <= f && f <= 3 && 0 <= r && r <=10 && 0 <= bf[b][f][r] + v && bf[b][f][r] <= 9
    bf[b][f][r] = bf[b][f][r] + v
    end
end

puts f11.join(" ")
puts f12.join(" ")
puts f13.join(" ")
puts "#" * 20
puts f21.join(" ")
puts f22.join(" ")
puts f23.join(" ")
puts "#" * 20
puts f31.join(" ")
puts f32.join(" ")
puts f33.join(" ")
puts "#" * 20
puts f41.join(" ")
puts f42.join(" ")
puts f43.join(" ")