
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();	//notices
		int b = 0;		//buildings 4
		int f = 0;		//floors 3
		int r = 0;		//rooms	10
		int v = 0;		//persons
		
		//创建三维数组 值为0
		int[][][] buildings = new int[4][3][10];
		for(int i=0;i<4;i++) {
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			}
		}
		
		for(int i=0;i<n;i++) {
			b = scanner.nextInt();
			f = scanner.nextInt();
			r = scanner.nextInt();
			v = scanner.nextInt();
			//三维数组
			buildings[b-1][f-1][r-1] += v;
		}
		for(int i=0;i<4;i++) {
			if (i!=0) {
				System.out.println("####################");
			}
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			}
		}
		scanner.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();	//notices
		int b = 0;		//buildings 4
		int f = 0;		//floors 3
		int r = 0;		//rooms	10
		int v = 0;		//persons
		
		//创建三维数组 值为0
		int[][][] buildings = new int[4][3][10];
		for(int i=0;i<4;i++) {
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			}
		}
		
		for(int i=0;i<n;i++) {
			b = scanner.nextInt();
			f = scanner.nextInt();
			r = scanner.nextInt();
			v = scanner.nextInt();
			//三维数组
			buildings[b-1][f-1][r-1] += v;
		}
		for(int i=0;i<4;i++) {
			if (i!=0) {
				System.out.println("####################");
			}
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			}
		}
		scanner.close();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();	//notices
		int b = 0;		//buildings 4
		int f = 0;		//floors 3
		int r = 0;		//rooms	10
		int v = 0;		//persons
		
		//创建三维数组 值为0
		int[][][] buildings = new int[4][3][10];
		for(int i=0;i<4;i++) {
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			}
		}
		
		for(int i=0;i<n;i++) {
			b = scanner.nextInt();
			f = scanner.nextInt();
			r = scanner.nextInt();
			v = scanner.nextInt();
			//三维数组
			buildings[b-1][f-1][r-1] += v;
		}
		for(int i=0;i<4;i++) {
			if (i!=0) {
				System.out.println("####################");
			}
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			}
		}
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();	//notices
		int b = 0;		//buildings 4
		int f = 0;		//floors 3
		int r = 0;		//rooms	10
		int v = 0;		//persons
		
		//创建三维数组 值为0
		int[][][] buildings = new int[4][3][10];
		for(int i=0;i<4;i++) {
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			}
		}
		
		for(int i=0;i<n;i++) {
			b = scanner.nextInt();
			f = scanner.nextInt();
			r = scanner.nextInt();
			v = scanner.nextInt();
			//三维数组
			buildings[b-1][f-1][r-1] += v;
		}
		for(int i=0;i<4;i++) {
			if (i!=0) {
				System.out.println("####################");
			}
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			}
		}
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int b = 0; b 0 int f = 0; f 0 int r = 0; r 0 int v = 0; v 0 int[][][] buildings = new int[4][3][10]; buildings new int[4][3][10] 4 3 10 for(int i=0;i<4;i++) {
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			}
		} int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			}
		} {
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			}
		} for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			} {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			} for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				} int k=0; int k=0; k 0 k<10 k 10 k++ k++ k {
					buildings[i][j][k]=0;
				} {
					buildings[i][j][k]=0;
				} buildings[i][j][k]=0 buildings[i][j][k] buildings[i][j] buildings[i] buildings i j k 0 for(int i=0;i<n;i++) {
			b = scanner.nextInt();
			f = scanner.nextInt();
			r = scanner.nextInt();
			v = scanner.nextInt();
			//三维数组
			buildings[b-1][f-1][r-1] += v;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			b = scanner.nextInt();
			f = scanner.nextInt();
			r = scanner.nextInt();
			v = scanner.nextInt();
			//三维数组
			buildings[b-1][f-1][r-1] += v;
		} {
			b = scanner.nextInt();
			f = scanner.nextInt();
			r = scanner.nextInt();
			v = scanner.nextInt();
			//三维数组
			buildings[b-1][f-1][r-1] += v;
		} b = scanner.nextInt() b scanner.nextInt() scanner.nextInt scanner f = scanner.nextInt() f scanner.nextInt() scanner.nextInt scanner r = scanner.nextInt() r scanner.nextInt() scanner.nextInt scanner v = scanner.nextInt() v scanner.nextInt() scanner.nextInt scanner buildings[b-1][f-1][r-1] += v buildings[b-1][f-1][r-1] buildings[b-1][f-1] buildings[b-1] buildings b-1 b 1 f-1 f 1 r-1 r 1 v for(int i=0;i<4;i++) {
			if (i!=0) {
				System.out.println("####################");
			}
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			}
		} int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
			if (i!=0) {
				System.out.println("####################");
			}
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			}
		} {
			if (i!=0) {
				System.out.println("####################");
			}
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			}
		} if (i!=0) {
				System.out.println("####################");
			} i!=0 i 0 {
				System.out.println("####################");
			} System.out.println("####################") System.out.println System.out System System.out "####################" for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			} {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			} for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				} int k=0; int k=0; k 0 k<10 k 10 k++ k++ k {
					System.out.print(" " + buildings[i][j][k]);
				} {
					System.out.print(" " + buildings[i][j][k]);
				} System.out.print(" " + buildings[i][j][k]) System.out.print System.out System System.out " " + buildings[i][j][k] " " buildings[i][j][k] buildings[i][j] buildings[i] buildings i j k System.out.println() System.out.println System.out System System.out scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();	//notices
		int b = 0;		//buildings 4
		int f = 0;		//floors 3
		int r = 0;		//rooms	10
		int v = 0;		//persons
		
		//创建三维数组 值为0
		int[][][] buildings = new int[4][3][10];
		for(int i=0;i<4;i++) {
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			}
		}
		
		for(int i=0;i<n;i++) {
			b = scanner.nextInt();
			f = scanner.nextInt();
			r = scanner.nextInt();
			v = scanner.nextInt();
			//三维数组
			buildings[b-1][f-1][r-1] += v;
		}
		for(int i=0;i<4;i++) {
			if (i!=0) {
				System.out.println("####################");
			}
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			}
		}
		scanner.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();	//notices
		int b = 0;		//buildings 4
		int f = 0;		//floors 3
		int r = 0;		//rooms	10
		int v = 0;		//persons
		
		//创建三维数组 值为0
		int[][][] buildings = new int[4][3][10];
		for(int i=0;i<4;i++) {
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			}
		}
		
		for(int i=0;i<n;i++) {
			b = scanner.nextInt();
			f = scanner.nextInt();
			r = scanner.nextInt();
			v = scanner.nextInt();
			//三维数组
			buildings[b-1][f-1][r-1] += v;
		}
		for(int i=0;i<4;i++) {
			if (i!=0) {
				System.out.println("####################");
			}
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			}
		}
		scanner.close();
	}
} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();	//notices
		int b = 0;		//buildings 4
		int f = 0;		//floors 3
		int r = 0;		//rooms	10
		int v = 0;		//persons
		
		//创建三维数组 值为0
		int[][][] buildings = new int[4][3][10];
		for(int i=0;i<4;i++) {
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					buildings[i][j][k]=0;
				}
			}
		}
		
		for(int i=0;i<n;i++) {
			b = scanner.nextInt();
			f = scanner.nextInt();
			r = scanner.nextInt();
			v = scanner.nextInt();
			//三维数组
			buildings[b-1][f-1][r-1] += v;
		}
		for(int i=0;i<4;i++) {
			if (i!=0) {
				System.out.println("####################");
			}
			for(int j=0;j<3;j++) {
				for(int k=0;k<10;k++) {
					System.out.print(" " + buildings[i][j][k]);
				}
				System.out.println();
			}
		}
		scanner.close();
	}
}
