import java.util.Scanner;

public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		int[][][] room = new int[4][][];
		for (int i = 0; i < 4; i++) {
			room[i] = new int[3][];
			for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			}
		}
		int n = scan.nextInt();
		for (int i = 0; i < n; i++) {
			int b = scan.nextInt();
			int f = scan.nextInt();
			int r = scan.nextInt();
			int v = scan.nextInt();
			room[b - 1][f - 1][r - 1] += v;
		}
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			}
			if (i != 3) System.out.println("####################");
		}
	}
	public static void main(String[] args) {
		new Main().run();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		int[][][] room = new int[4][][];
		for (int i = 0; i < 4; i++) {
			room[i] = new int[3][];
			for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			}
		}
		int n = scan.nextInt();
		for (int i = 0; i < n; i++) {
			int b = scan.nextInt();
			int f = scan.nextInt();
			int r = scan.nextInt();
			int v = scan.nextInt();
			room[b - 1][f - 1][r - 1] += v;
		}
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			}
			if (i != 3) System.out.println("####################");
		}
	}
	public static void main(String[] args) {
		new Main().run();
	}
} Main void run() {
		Scanner scan = new Scanner(System.in);
		int[][][] room = new int[4][][];
		for (int i = 0; i < 4; i++) {
			room[i] = new int[3][];
			for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			}
		}
		int n = scan.nextInt();
		for (int i = 0; i < n; i++) {
			int b = scan.nextInt();
			int f = scan.nextInt();
			int r = scan.nextInt();
			int v = scan.nextInt();
			room[b - 1][f - 1][r - 1] += v;
		}
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			}
			if (i != 3) System.out.println("####################");
		}
	} run {
		Scanner scan = new Scanner(System.in);
		int[][][] room = new int[4][][];
		for (int i = 0; i < 4; i++) {
			room[i] = new int[3][];
			for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			}
		}
		int n = scan.nextInt();
		for (int i = 0; i < n; i++) {
			int b = scan.nextInt();
			int f = scan.nextInt();
			int r = scan.nextInt();
			int v = scan.nextInt();
			room[b - 1][f - 1][r - 1] += v;
		}
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			}
			if (i != 3) System.out.println("####################");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[][][] room = new int[4][][]; room new int[4][][] 4 for (int i = 0; i < 4; i++) {
			room[i] = new int[3][];
			for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			room[i] = new int[3][];
			for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			}
		} {
			room[i] = new int[3][];
			for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			}
		} room[i] = new int[3][] room[i] room i new int[3][] 3 for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			} int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
				room[i][j] = new int[10];
			} {
				room[i][j] = new int[10];
			} room[i][j] = new int[10] room[i][j] room[i] room i j new int[10] 10 int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan for (int i = 0; i < n; i++) {
			int b = scan.nextInt();
			int f = scan.nextInt();
			int r = scan.nextInt();
			int v = scan.nextInt();
			room[b - 1][f - 1][r - 1] += v;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int b = scan.nextInt();
			int f = scan.nextInt();
			int r = scan.nextInt();
			int v = scan.nextInt();
			room[b - 1][f - 1][r - 1] += v;
		} {
			int b = scan.nextInt();
			int f = scan.nextInt();
			int r = scan.nextInt();
			int v = scan.nextInt();
			room[b - 1][f - 1][r - 1] += v;
		} int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int f = scan.nextInt(); f scan.nextInt() scan.nextInt scan int r = scan.nextInt(); r scan.nextInt() scan.nextInt scan int v = scan.nextInt(); v scan.nextInt() scan.nextInt scan room[b - 1][f - 1][r - 1] += v room[b - 1][f - 1][r - 1] room[b - 1][f - 1] room[b - 1] room b - 1 b 1 f - 1 f 1 r - 1 r 1 v for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			}
			if (i != 3) System.out.println("####################");
		} 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++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			}
			if (i != 3) System.out.println("####################");
		} {
			for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			}
			if (i != 3) System.out.println("####################");
		} for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[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(" " + room[i][j][k]);
				}
				System.out.println();
			} {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			} for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				} int k = 0; int k = 0; k 0 k < 10 k 10 k++ k++ k {
					System.out.print(" " + room[i][j][k]);
				} {
					System.out.print(" " + room[i][j][k]);
				} System.out.print(" " + room[i][j][k]) System.out.print System.out System System.out " " + room[i][j][k] " " room[i][j][k] room[i][j] room[i] room 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 System System.out "####################" public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		int[][][] room = new int[4][][];
		for (int i = 0; i < 4; i++) {
			room[i] = new int[3][];
			for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			}
		}
		int n = scan.nextInt();
		for (int i = 0; i < n; i++) {
			int b = scan.nextInt();
			int f = scan.nextInt();
			int r = scan.nextInt();
			int v = scan.nextInt();
			room[b - 1][f - 1][r - 1] += v;
		}
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			}
			if (i != 3) System.out.println("####################");
		}
	}
	public static void main(String[] args) {
		new Main().run();
	}
} public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		int[][][] room = new int[4][][];
		for (int i = 0; i < 4; i++) {
			room[i] = new int[3][];
			for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			}
		}
		int n = scan.nextInt();
		for (int i = 0; i < n; i++) {
			int b = scan.nextInt();
			int f = scan.nextInt();
			int r = scan.nextInt();
			int v = scan.nextInt();
			room[b - 1][f - 1][r - 1] += v;
		}
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			}
			if (i != 3) System.out.println("####################");
		}
	}
	public static void main(String[] args) {
		new Main().run();
	}
} Main
import java.util.Scanner;

public class Main {
	void run() {
		Scanner scan = new Scanner(System.in);
		int[][][] room = new int[4][][];
		for (int i = 0; i < 4; i++) {
			room[i] = new int[3][];
			for (int j = 0; j < 3; j++) {
				room[i][j] = new int[10];
			}
		}
		int n = scan.nextInt();
		for (int i = 0; i < n; i++) {
			int b = scan.nextInt();
			int f = scan.nextInt();
			int r = scan.nextInt();
			int v = scan.nextInt();
			room[b - 1][f - 1][r - 1] += v;
		}
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 10; k++) {
					System.out.print(" " + room[i][j][k]);
				}
				System.out.println();
			}
			if (i != 3) System.out.println("####################");
		}
	}
	public static void main(String[] args) {
		new Main().run();
	}
}