import java.util.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    private static int[][][] ary;
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        ary = new int[4][3][10];
        for (int i = 0;i < n;i++) {
            int b = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();
            int v = sc.nextInt();
            calc(b, f, r, v);
        }
        disp();
    }
    
    private static void calc(int b, int f, int r, int v) {
        ary[b-1][f-1][r-1] += v;
    }
    
    private static void disp() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0;i < 4;i++) {
            for (int j = 0;j < 3;j++) {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            }
            if (i == 3) break;
            System.out.println("####################");
        }
    }
} import java.util.*; util.* java public class Main {
    private static Scanner sc = new Scanner(System.in);
    private static int[][][] ary;
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        ary = new int[4][3][10];
        for (int i = 0;i < n;i++) {
            int b = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();
            int v = sc.nextInt();
            calc(b, f, r, v);
        }
        disp();
    }
    
    private static void calc(int b, int f, int r, int v) {
        ary[b-1][f-1][r-1] += v;
    }
    
    private static void disp() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0;i < 4;i++) {
            for (int j = 0;j < 3;j++) {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            }
            if (i == 3) break;
            System.out.println("####################");
        }
    }
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) private static int[][][] ary; ary public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        ary = new int[4][3][10];
        for (int i = 0;i < n;i++) {
            int b = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();
            int v = sc.nextInt();
            calc(b, f, r, v);
        }
        disp();
    } main {
        int n = sc.nextInt();
        ary = new int[4][3][10];
        for (int i = 0;i < n;i++) {
            int b = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();
            int v = sc.nextInt();
            calc(b, f, r, v);
        }
        disp();
    } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc ary = new int[4][3][10] ary new int[4][3][10] 4 3 10 for (int i = 0;i < n;i++) {
            int b = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();
            int v = sc.nextInt();
            calc(b, f, r, v);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int b = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();
            int v = sc.nextInt();
            calc(b, f, r, v);
        } {
            int b = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();
            int v = sc.nextInt();
            calc(b, f, r, v);
        } int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int f = sc.nextInt(); f sc.nextInt() sc.nextInt sc int r = sc.nextInt(); r sc.nextInt() sc.nextInt sc int v = sc.nextInt(); v sc.nextInt() sc.nextInt sc calc(b, f, r, v) calc b f r v disp() disp String[] args args private static void calc(int b, int f, int r, int v) {
        ary[b-1][f-1][r-1] += v;
    } calc {
        ary[b-1][f-1][r-1] += v;
    } ary[b-1][f-1][r-1] += v ary[b-1][f-1][r-1] ary[b-1][f-1] ary[b-1] ary b-1 b 1 f-1 f 1 r-1 r 1 v int b b int f f int r r int v v private static void disp() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0;i < 4;i++) {
            for (int j = 0;j < 3;j++) {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            }
            if (i == 3) break;
            System.out.println("####################");
        }
    } disp {
        StringBuilder sb = new StringBuilder();
        for (int i = 0;i < 4;i++) {
            for (int j = 0;j < 3;j++) {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            }
            if (i == 3) break;
            System.out.println("####################");
        }
    } StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0;i < 4;i++) {
            for (int j = 0;j < 3;j++) {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            }
            if (i == 3) break;
            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++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            }
            if (i == 3) break;
            System.out.println("####################");
        } {
            for (int j = 0;j < 3;j++) {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            }
            if (i == 3) break;
            System.out.println("####################");
        } for (int j = 0;j < 3;j++) {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            } {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            } for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                } int k = 0; int k = 0; k 0 k < 10 k 10 k++ k++ k {
                    sb.append(" ").append(ary[i][j][k]);
                } {
                    sb.append(" ").append(ary[i][j][k]);
                } sb.append(" ").append(ary[i][j][k]) sb.append(" ").append sb.append(" ") sb.append sb " " ary[i][j][k] ary[i][j] ary[i] ary i j k System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb sb = new StringBuilder() sb new StringBuilder() if (i == 3) break; i == 3 i 3 break; System.out.println("####################") System.out.println System.out System System.out "####################" public class Main {
    private static Scanner sc = new Scanner(System.in);
    private static int[][][] ary;
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        ary = new int[4][3][10];
        for (int i = 0;i < n;i++) {
            int b = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();
            int v = sc.nextInt();
            calc(b, f, r, v);
        }
        disp();
    }
    
    private static void calc(int b, int f, int r, int v) {
        ary[b-1][f-1][r-1] += v;
    }
    
    private static void disp() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0;i < 4;i++) {
            for (int j = 0;j < 3;j++) {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            }
            if (i == 3) break;
            System.out.println("####################");
        }
    }
} public class Main {
    private static Scanner sc = new Scanner(System.in);
    private static int[][][] ary;
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        ary = new int[4][3][10];
        for (int i = 0;i < n;i++) {
            int b = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();
            int v = sc.nextInt();
            calc(b, f, r, v);
        }
        disp();
    }
    
    private static void calc(int b, int f, int r, int v) {
        ary[b-1][f-1][r-1] += v;
    }
    
    private static void disp() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0;i < 4;i++) {
            for (int j = 0;j < 3;j++) {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            }
            if (i == 3) break;
            System.out.println("####################");
        }
    }
} Main
import java.util.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    private static int[][][] ary;
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        ary = new int[4][3][10];
        for (int i = 0;i < n;i++) {
            int b = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();
            int v = sc.nextInt();
            calc(b, f, r, v);
        }
        disp();
    }
    
    private static void calc(int b, int f, int r, int v) {
        ary[b-1][f-1][r-1] += v;
    }
    
    private static void disp() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0;i < 4;i++) {
            for (int j = 0;j < 3;j++) {
                for (int k = 0;k < 10;k++) {
                    sb.append(" ").append(ary[i][j][k]);
                }
                System.out.println(sb.toString());
                sb = new StringBuilder();
            }
            if (i == 3) break;
            System.out.println("####################");
        }
    }
}