import java.util.Scanner;

  class Main{
	public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	 int data[][][] = new int[4][3][10];
	 int n, b, f, r, v, i, j, k;
	 n = scan.nextInt();
	   
	 for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  }
	 }
	   
	 for(i = 0; i < n; i++) {
	  b = scan.nextInt();
	  f = scan.nextInt();
	  r = scan.nextInt();
	  v = scan.nextInt();
	  data[b-1][f-1][r-1] += v;
	 }
	   
	 for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  }
	  if(i != 3) {
	  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 data[][][] = new int[4][3][10];
	 int n, b, f, r, v, i, j, k;
	 n = scan.nextInt();
	   
	 for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  }
	 }
	   
	 for(i = 0; i < n; i++) {
	  b = scan.nextInt();
	  f = scan.nextInt();
	  r = scan.nextInt();
	  v = scan.nextInt();
	  data[b-1][f-1][r-1] += v;
	 }
	   
	 for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  }
	  if(i != 3) {
	  System.out.println("####################");
	  }
	 }

	}
} Main public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	 int data[][][] = new int[4][3][10];
	 int n, b, f, r, v, i, j, k;
	 n = scan.nextInt();
	   
	 for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  }
	 }
	   
	 for(i = 0; i < n; i++) {
	  b = scan.nextInt();
	  f = scan.nextInt();
	  r = scan.nextInt();
	  v = scan.nextInt();
	  data[b-1][f-1][r-1] += v;
	 }
	   
	 for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  }
	  if(i != 3) {
	  System.out.println("####################");
	  }
	 }

	} main {
	Scanner scan = new Scanner(System.in);

	 int data[][][] = new int[4][3][10];
	 int n, b, f, r, v, i, j, k;
	 n = scan.nextInt();
	   
	 for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  }
	 }
	   
	 for(i = 0; i < n; i++) {
	  b = scan.nextInt();
	  f = scan.nextInt();
	  r = scan.nextInt();
	  v = scan.nextInt();
	  data[b-1][f-1][r-1] += v;
	 }
	   
	 for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  }
	  if(i != 3) {
	  System.out.println("####################");
	  }
	 }

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int data[][][] = new int[4][3][10]; data new int[4][3][10] 4 3 10 int n n b b f f r r v v i i j j k; k n = scan.nextInt() n scan.nextInt() scan.nextInt scan for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  }
	 } i = 0; i = 0 i 0 i < 4 i 4 i++ i++ i {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  }
	 } {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  }
	 } for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  } j = 0; j = 0 j 0 j < 3 j 3 j++ j++ j {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  } {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  } for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   } k = 0; k = 0 k 0 k < 10 k 10 k++ k++ k {
	    data[i][j][j] = 0;
	   } {
	    data[i][j][j] = 0;
	   } data[i][j][j] = 0 data[i][j][j] data[i][j] data[i] data i j j 0 for(i = 0; i < n; i++) {
	  b = scan.nextInt();
	  f = scan.nextInt();
	  r = scan.nextInt();
	  v = scan.nextInt();
	  data[b-1][f-1][r-1] += v;
	 } i = 0; i = 0 i 0 i < n i n i++ i++ i {
	  b = scan.nextInt();
	  f = scan.nextInt();
	  r = scan.nextInt();
	  v = scan.nextInt();
	  data[b-1][f-1][r-1] += v;
	 } {
	  b = scan.nextInt();
	  f = scan.nextInt();
	  r = scan.nextInt();
	  v = scan.nextInt();
	  data[b-1][f-1][r-1] += v;
	 } b = scan.nextInt() b scan.nextInt() scan.nextInt scan f = scan.nextInt() f scan.nextInt() scan.nextInt scan r = scan.nextInt() r scan.nextInt() scan.nextInt scan v = scan.nextInt() v scan.nextInt() scan.nextInt scan data[b-1][f-1][r-1] += v data[b-1][f-1][r-1] data[b-1][f-1] data[b-1] data b-1 b 1 f-1 f 1 r-1 r 1 v for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  }
	  if(i != 3) {
	  System.out.println("####################");
	  }
	 } i = 0; i = 0 i 0 i < 4 i 4 i++ i++ i {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  }
	  if(i != 3) {
	  System.out.println("####################");
	  }
	 } {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  }
	  if(i != 3) {
	  System.out.println("####################");
	  }
	 } for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  } j = 0; j = 0 j 0 j < 3 j 3 j++ j++ j {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  } {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  } for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   } k = 0; k = 0 k 0 k < 10 k 10 k++ k++ k {
		System.out.print(" " + data[i][j][k]);
	   } {
		System.out.print(" " + data[i][j][k]);
	   } System.out.print(" " + data[i][j][k]) System.out.print System.out System System.out " " + data[i][j][k] " " data[i][j][k] data[i][j] data[i] data i j k System.out.println("") System.out.println System.out System System.out "" if(i != 3) {
	  System.out.println("####################");
	  } i != 3 i 3 {
	  System.out.println("####################");
	  } 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 data[][][] = new int[4][3][10];
	 int n, b, f, r, v, i, j, k;
	 n = scan.nextInt();
	   
	 for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
	    data[i][j][j] = 0;
	   }
	  }
	 }
	   
	 for(i = 0; i < n; i++) {
	  b = scan.nextInt();
	  f = scan.nextInt();
	  r = scan.nextInt();
	  v = scan.nextInt();
	  data[b-1][f-1][r-1] += v;
	 }
	   
	 for(i = 0; i < 4; i++) {
	  for(j = 0; j < 3; j++) {
	   for(k = 0; k < 10; k++) {
		System.out.print(" " + data[i][j][k]);
	   }
	   System.out.println("");
	  }
	  if(i != 3) {
	  System.out.println("####################");
	  }
	 }

	}
}