import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int a=scan.nextInt();
int[][][] c=new int[5][4][11];
for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
}
}
for(int b=0;b<a;b++){
int d=scan.nextInt();
int e=scan.nextInt();
int f=scan.nextInt();
int g=scan.nextInt();
c[d][e][f]=c[d][e][f]+g;
}
for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
}
if(x!=4)
System.out.println("####################");
}
}
} import java.util.Scanner; Scanner java.util class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int a=scan.nextInt();
int[][][] c=new int[5][4][11];
for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
}
}
for(int b=0;b<a;b++){
int d=scan.nextInt();
int e=scan.nextInt();
int f=scan.nextInt();
int g=scan.nextInt();
c[d][e][f]=c[d][e][f]+g;
}
for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
}
if(x!=4)
System.out.println("####################");
}
}
} Main public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int a=scan.nextInt();
int[][][] c=new int[5][4][11];
for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
}
}
for(int b=0;b<a;b++){
int d=scan.nextInt();
int e=scan.nextInt();
int f=scan.nextInt();
int g=scan.nextInt();
c[d][e][f]=c[d][e][f]+g;
}
for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
}
if(x!=4)
System.out.println("####################");
}
} main {
Scanner scan=new Scanner(System.in);
int a=scan.nextInt();
int[][][] c=new int[5][4][11];
for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
}
}
for(int b=0;b<a;b++){
int d=scan.nextInt();
int e=scan.nextInt();
int f=scan.nextInt();
int g=scan.nextInt();
c[d][e][f]=c[d][e][f]+g;
}
for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
}
if(x!=4)
System.out.println("####################");
}
} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int a=scan.nextInt(); a scan.nextInt() scan.nextInt scan int[][][] c=new int[5][4][11]; c new int[5][4][11] 5 4 11 for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
}
} int x=1; int x=1; x 1 x<5 x 5 x++ x++ x {
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
}
} {
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
}
} for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
} int y=1; int y=1; y 1 y<4 y 4 y++ y++ y {
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
} {
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
} for(int z=1;z<11;z++){
c[x][y][z]=0;
} int z=1; int z=1; z 1 z<11 z 11 z++ z++ z {
c[x][y][z]=0;
} {
c[x][y][z]=0;
} c[x][y][z]=0 c[x][y][z] c[x][y] c[x] c x y z 0 for(int b=0;b<a;b++){
int d=scan.nextInt();
int e=scan.nextInt();
int f=scan.nextInt();
int g=scan.nextInt();
c[d][e][f]=c[d][e][f]+g;
} int b=0; int b=0; b 0 b<a b a b++ b++ b {
int d=scan.nextInt();
int e=scan.nextInt();
int f=scan.nextInt();
int g=scan.nextInt();
c[d][e][f]=c[d][e][f]+g;
} {
int d=scan.nextInt();
int e=scan.nextInt();
int f=scan.nextInt();
int g=scan.nextInt();
c[d][e][f]=c[d][e][f]+g;
} int d=scan.nextInt(); d scan.nextInt() scan.nextInt scan int e=scan.nextInt(); e scan.nextInt() scan.nextInt scan int f=scan.nextInt(); f scan.nextInt() scan.nextInt scan int g=scan.nextInt(); g scan.nextInt() scan.nextInt scan c[d][e][f]=c[d][e][f]+g c[d][e][f] c[d][e] c[d] c d e f c[d][e][f]+g c[d][e][f] c[d][e] c[d] c d e f g for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
}
if(x!=4)
System.out.println("####################");
} int x=1; int x=1; x 1 x<5 x 5 x++ x++ x {
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
}
if(x!=4)
System.out.println("####################");
} {
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
}
if(x!=4)
System.out.println("####################");
} for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
} int y=1; int y=1; y 1 y<4 y 4 y++ y++ y {
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
} {
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
} for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
} int z=1; int z=1; z 1 z<11 z 11 z++ z++ z {
System.out.print(" "+c[x][y][z]);
} {
System.out.print(" "+c[x][y][z]);
} System.out.print(" "+c[x][y][z]) System.out.print System.out System System.out " "+c[x][y][z] " " c[x][y][z] c[x][y] c[x] c x y z System.out.println() System.out.println System.out System System.out if(x!=4)
System.out.println("####################"); x!=4 x 4 System.out.println("####################") System.out.println System.out System System.out "####################" String[] args args
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int a=scan.nextInt();
int[][][] c=new int[5][4][11];
for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
c[x][y][z]=0;
}
}
}
for(int b=0;b<a;b++){
int d=scan.nextInt();
int e=scan.nextInt();
int f=scan.nextInt();
int g=scan.nextInt();
c[d][e][f]=c[d][e][f]+g;
}
for(int x=1;x<5;x++){
for(int y=1;y<4;y++){
for(int z=1;z<11;z++){
System.out.print(" "+c[x][y][z]);
}
System.out.println();
}
if(x!=4)
System.out.println("####################");
}
}
}