import java.util.Scanner;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int noticeNum = scan.nextInt();
		int building1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building2[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building4[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		while (noticeNum > 0) {
			int building = scan.nextInt();
			int floor = scan.nextInt();
			int room = scan.nextInt();
			int number = scan.nextInt();
			room = room + (10 * floor - 10) - 1;
			if (building == 1) {
				building1[room] += number;
			}
			if (building == 2) {
				building2[room] += number;
			}
			if (building == 3) {
				building3[room] += number;
			}
			if (building == 4) {
				building4[room] += number;
			}
			noticeNum--;
		}
		for (int i = 0; i < 15; i++) {
			for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		}System.out.println("");
	}
}
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int noticeNum = scan.nextInt();
		int building1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building2[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building4[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		while (noticeNum > 0) {
			int building = scan.nextInt();
			int floor = scan.nextInt();
			int room = scan.nextInt();
			int number = scan.nextInt();
			room = room + (10 * floor - 10) - 1;
			if (building == 1) {
				building1[room] += number;
			}
			if (building == 2) {
				building2[room] += number;
			}
			if (building == 3) {
				building3[room] += number;
			}
			if (building == 4) {
				building4[room] += number;
			}
			noticeNum--;
		}
		for (int i = 0; i < 15; i++) {
			for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		}System.out.println("");
	}
}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int noticeNum = scan.nextInt();
		int building1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building2[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building4[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		while (noticeNum > 0) {
			int building = scan.nextInt();
			int floor = scan.nextInt();
			int room = scan.nextInt();
			int number = scan.nextInt();
			room = room + (10 * floor - 10) - 1;
			if (building == 1) {
				building1[room] += number;
			}
			if (building == 2) {
				building2[room] += number;
			}
			if (building == 3) {
				building3[room] += number;
			}
			if (building == 4) {
				building4[room] += number;
			}
			noticeNum--;
		}
		for (int i = 0; i < 15; i++) {
			for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		}System.out.println("");
	}
} main {
		Scanner scan = new Scanner(System.in);
		int noticeNum = scan.nextInt();
		int building1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building2[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building4[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		while (noticeNum > 0) {
			int building = scan.nextInt();
			int floor = scan.nextInt();
			int room = scan.nextInt();
			int number = scan.nextInt();
			room = room + (10 * floor - 10) - 1;
			if (building == 1) {
				building1[room] += number;
			}
			if (building == 2) {
				building2[room] += number;
			}
			if (building == 3) {
				building3[room] += number;
			}
			if (building == 4) {
				building4[room] += number;
			}
			noticeNum--;
		}
		for (int i = 0; i < 15; i++) {
			for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		}System.out.println("");
	}
} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int noticeNum = scan.nextInt(); noticeNum scan.nextInt() scan.nextInt scan int building1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; building1 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 int building2[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; building2 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 int building3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; building3 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 int building4[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; building4 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 while (noticeNum > 0) {
			int building = scan.nextInt();
			int floor = scan.nextInt();
			int room = scan.nextInt();
			int number = scan.nextInt();
			room = room + (10 * floor - 10) - 1;
			if (building == 1) {
				building1[room] += number;
			}
			if (building == 2) {
				building2[room] += number;
			}
			if (building == 3) {
				building3[room] += number;
			}
			if (building == 4) {
				building4[room] += number;
			}
			noticeNum--;
		} noticeNum > 0 noticeNum 0 {
			int building = scan.nextInt();
			int floor = scan.nextInt();
			int room = scan.nextInt();
			int number = scan.nextInt();
			room = room + (10 * floor - 10) - 1;
			if (building == 1) {
				building1[room] += number;
			}
			if (building == 2) {
				building2[room] += number;
			}
			if (building == 3) {
				building3[room] += number;
			}
			if (building == 4) {
				building4[room] += number;
			}
			noticeNum--;
		} int building = scan.nextInt(); building scan.nextInt() scan.nextInt scan int floor = scan.nextInt(); floor scan.nextInt() scan.nextInt scan int room = scan.nextInt(); room scan.nextInt() scan.nextInt scan int number = scan.nextInt(); number scan.nextInt() scan.nextInt scan room = room + (10 * floor - 10) - 1 room room + (10 * floor - 10) - 1 room + (10 * floor - 10) room (10 * floor - 10) 10 * floor 10 floor 10 1 if (building == 1) {
				building1[room] += number;
			} building == 1 building 1 {
				building1[room] += number;
			} building1[room] += number building1[room] building1 room number if (building == 2) {
				building2[room] += number;
			} building == 2 building 2 {
				building2[room] += number;
			} building2[room] += number building2[room] building2 room number if (building == 3) {
				building3[room] += number;
			} building == 3 building 3 {
				building3[room] += number;
			} building3[room] += number building3[room] building3 room number if (building == 4) {
				building4[room] += number;
			} building == 4 building 4 {
				building4[room] += number;
			} building4[room] += number building4[room] building4 room number noticeNum-- noticeNum for (int i = 0; i < 15; i++) {
			for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		}System.out.println("");
	} int i = 0; int i = 0; i 0 i < 15 i 15 i++ i++ i {
			for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		}System.out.println("");
	} {
			for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		}System.out.println("");
	} for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		} int j = 0; int j = 0; j 0 j < 10 j 10 j++ j++ j {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		} {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		} if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			} i == 3 || i == 7 || i == 11 i == 3 || i == 7 || i == 11 i == 3 i 3 i == 7 i 7 i == 11 i 11 {
					System.out.print("##");
				} System.out.print("##") System.out.print System.out System System.out "##" if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			} i < 3 i 3 {
					System.out.print(" " + building1[j + (10 * i)]);
				} System.out.print(" " + building1[j + (10 * i)]) System.out.print System.out System System.out " " + building1[j + (10 * i)] " " building1[j + (10 * i)] building1 j + (10 * i) j (10 * i) 10 i if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			} i > 3 && i < 7 i > 3 i 3 i < 7 i 7 {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} System.out.print(" " + building2[j + (10 * i -40)]) System.out.print System.out System System.out " " + building2[j + (10 * i -40)] " " building2[j + (10 * i -40)] building2 j + (10 * i -40) j (10 * i -40) 10 * i 10 i 40 if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			} i > 7 && i < 11 i > 7 i 7 i < 11 i 11 {
					System.out.print(" " + building3[j + (10 * i -80)]);
				} System.out.print(" " + building3[j + (10 * i -80)]) System.out.print System.out System System.out " " + building3[j + (10 * i -80)] " " building3[j + (10 * i -80)] building3 j + (10 * i -80) j (10 * i -80) 10 * i 10 i 80 if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			} i > 11 i 11 {
					System.out.print(" " + building4[j + (10 * i -120)]);
			} System.out.print(" " + building4[j + (10 * i -120)]) System.out.print System.out System System.out " " + building4[j + (10 * i -120)] " " building4[j + (10 * i -120)] building4 j + (10 * i -120) j (10 * i -120) 10 * i 10 i 120 System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int noticeNum = scan.nextInt();
		int building1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building2[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building4[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		while (noticeNum > 0) {
			int building = scan.nextInt();
			int floor = scan.nextInt();
			int room = scan.nextInt();
			int number = scan.nextInt();
			room = room + (10 * floor - 10) - 1;
			if (building == 1) {
				building1[room] += number;
			}
			if (building == 2) {
				building2[room] += number;
			}
			if (building == 3) {
				building3[room] += number;
			}
			if (building == 4) {
				building4[room] += number;
			}
			noticeNum--;
		}
		for (int i = 0; i < 15; i++) {
			for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		}System.out.println("");
	}
}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int noticeNum = scan.nextInt();
		int building1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building2[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building4[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		while (noticeNum > 0) {
			int building = scan.nextInt();
			int floor = scan.nextInt();
			int room = scan.nextInt();
			int number = scan.nextInt();
			room = room + (10 * floor - 10) - 1;
			if (building == 1) {
				building1[room] += number;
			}
			if (building == 2) {
				building2[room] += number;
			}
			if (building == 3) {
				building3[room] += number;
			}
			if (building == 4) {
				building4[room] += number;
			}
			noticeNum--;
		}
		for (int i = 0; i < 15; i++) {
			for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		}System.out.println("");
	}
}
} Main
import java.util.Scanner;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int noticeNum = scan.nextInt();
		int building1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building2[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		int building4[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		while (noticeNum > 0) {
			int building = scan.nextInt();
			int floor = scan.nextInt();
			int room = scan.nextInt();
			int number = scan.nextInt();
			room = room + (10 * floor - 10) - 1;
			if (building == 1) {
				building1[room] += number;
			}
			if (building == 2) {
				building2[room] += number;
			}
			if (building == 3) {
				building3[room] += number;
			}
			if (building == 4) {
				building4[room] += number;
			}
			noticeNum--;
		}
		for (int i = 0; i < 15; i++) {
			for (int j = 0; j < 10; j++) {
				if (i == 3 || i == 7 || i == 11) {
					System.out.print("##");
				} else if (i < 3) {
					System.out.print(" " + building1[j + (10 * i)]);
				} else if (i > 3 && i < 7) {
					System.out.print(" " + building2[j + (10 * i -40)]);
				} else if (i > 7 && i < 11) {
					System.out.print(" " + building3[j + (10 * i -80)]);
				}else if (i > 11) {
					System.out.print(" " + building4[j + (10 * i -120)]);
			}
		}System.out.println("");
	}
}
}
