import java.io.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader  br=new BufferedReader(new InputStreamReader(System.in));
String str=br.readLine();
int n=Integer.parseInt(str);
int[][][] residents=new int[4][3][10];
for(int i=0; i<n; i++){
String str2=br.readLine();
String[] data=str2.split(" ");
int b=Integer.parseInt(data[0])-1;
int f=Integer.parseInt(data[1])-1;
int r=Integer.parseInt(data[2])-1;
int v=Integer.parseInt(data[3]);
residents[b][f][r] += v;
}
for(int x=0;x<4;x++){
for(int y=0;y<3;y++){
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
}
}
}
} import java.io.*; io.* java class Main{
public static void main(String[] args)throws IOException{
BufferedReader  br=new BufferedReader(new InputStreamReader(System.in));
String str=br.readLine();
int n=Integer.parseInt(str);
int[][][] residents=new int[4][3][10];
for(int i=0; i<n; i++){
String str2=br.readLine();
String[] data=str2.split(" ");
int b=Integer.parseInt(data[0])-1;
int f=Integer.parseInt(data[1])-1;
int r=Integer.parseInt(data[2])-1;
int v=Integer.parseInt(data[3]);
residents[b][f][r] += v;
}
for(int x=0;x<4;x++){
for(int y=0;y<3;y++){
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
}
}
}
} Main public static void main(String[] args)throws IOException{
BufferedReader  br=new BufferedReader(new InputStreamReader(System.in));
String str=br.readLine();
int n=Integer.parseInt(str);
int[][][] residents=new int[4][3][10];
for(int i=0; i<n; i++){
String str2=br.readLine();
String[] data=str2.split(" ");
int b=Integer.parseInt(data[0])-1;
int f=Integer.parseInt(data[1])-1;
int r=Integer.parseInt(data[2])-1;
int v=Integer.parseInt(data[3]);
residents[b][f][r] += v;
}
for(int x=0;x<4;x++){
for(int y=0;y<3;y++){
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
}
}
} main {
BufferedReader  br=new BufferedReader(new InputStreamReader(System.in));
String str=br.readLine();
int n=Integer.parseInt(str);
int[][][] residents=new int[4][3][10];
for(int i=0; i<n; i++){
String str2=br.readLine();
String[] data=str2.split(" ");
int b=Integer.parseInt(data[0])-1;
int f=Integer.parseInt(data[1])-1;
int r=Integer.parseInt(data[2])-1;
int v=Integer.parseInt(data[3]);
residents[b][f][r] += v;
}
for(int x=0;x<4;x++){
for(int y=0;y<3;y++){
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
}
}
} BufferedReader  br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str=br.readLine(); str br.readLine() br.readLine br int n=Integer.parseInt(str); n Integer.parseInt(str) Integer.parseInt Integer str int[][][] residents=new int[4][3][10]; residents new int[4][3][10] 4 3 10 for(int i=0; i<n; i++){
String str2=br.readLine();
String[] data=str2.split(" ");
int b=Integer.parseInt(data[0])-1;
int f=Integer.parseInt(data[1])-1;
int r=Integer.parseInt(data[2])-1;
int v=Integer.parseInt(data[3]);
residents[b][f][r] += v;
} int i=0; int i=0; i 0 i<n i n i++ i++ i {
String str2=br.readLine();
String[] data=str2.split(" ");
int b=Integer.parseInt(data[0])-1;
int f=Integer.parseInt(data[1])-1;
int r=Integer.parseInt(data[2])-1;
int v=Integer.parseInt(data[3]);
residents[b][f][r] += v;
} {
String str2=br.readLine();
String[] data=str2.split(" ");
int b=Integer.parseInt(data[0])-1;
int f=Integer.parseInt(data[1])-1;
int r=Integer.parseInt(data[2])-1;
int v=Integer.parseInt(data[3]);
residents[b][f][r] += v;
} String str2=br.readLine(); str2 br.readLine() br.readLine br String[] data=str2.split(" "); data str2.split(" ") str2.split str2 " " int b=Integer.parseInt(data[0])-1; b Integer.parseInt(data[0])-1 Integer.parseInt(data[0]) Integer.parseInt Integer data[0] data 0 1 int f=Integer.parseInt(data[1])-1; f Integer.parseInt(data[1])-1 Integer.parseInt(data[1]) Integer.parseInt Integer data[1] data 1 1 int r=Integer.parseInt(data[2])-1; r Integer.parseInt(data[2])-1 Integer.parseInt(data[2]) Integer.parseInt Integer data[2] data 2 1 int v=Integer.parseInt(data[3]); v Integer.parseInt(data[3]) Integer.parseInt Integer data[3] data 3 residents[b][f][r] += v residents[b][f][r] residents[b][f] residents[b] residents b f r v for(int x=0;x<4;x++){
for(int y=0;y<3;y++){
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
}
} int x=0; int x=0; x 0 x<4 x 4 x++ x++ x {
for(int y=0;y<3;y++){
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
}
} {
for(int y=0;y<3;y++){
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
}
} for(int y=0;y<3;y++){
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
} int y=0; int y=0; y 0 y<3 y 3 y++ y++ y {
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
} {
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
} for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
} int z=0; int z=0; z 0 z<10 z 10 z++ z++ z {
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
} {
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
} System.out.print(" "+residents[x][y][z]) System.out.print System.out System System.out " "+residents[x][y][z] " " residents[x][y][z] residents[x][y] residents[x] residents x y z if(z==9) System.out.println(); z==9 z 9 System.out.println() System.out.println System.out System System.out if(x!=3 && y==2 && z==9) System.out.println("####################"); x!=3 && y==2 && z==9 x!=3 && y==2 && z==9 x!=3 x 3 y==2 y 2 z==9 z 9 System.out.println("####################") System.out.println System.out System System.out "####################" String[] args args
import java.io.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader  br=new BufferedReader(new InputStreamReader(System.in));
String str=br.readLine();
int n=Integer.parseInt(str);
int[][][] residents=new int[4][3][10];
for(int i=0; i<n; i++){
String str2=br.readLine();
String[] data=str2.split(" ");
int b=Integer.parseInt(data[0])-1;
int f=Integer.parseInt(data[1])-1;
int r=Integer.parseInt(data[2])-1;
int v=Integer.parseInt(data[3]);
residents[b][f][r] += v;
}
for(int x=0;x<4;x++){
for(int y=0;y<3;y++){
for(int z=0;z<10;z++){
System.out.print(" "+residents[x][y][z]);
if(z==9) System.out.println();
if(x!=3 && y==2 && z==9) System.out.println("####################");
}
}
}
}
}