import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int x = Integer.parseInt(br.readLine());
        int[][][] array = new int [4][3][10];
        for(int i = 0; i < x; i++){
            String[] str = br.readLine().split(" ");
            int house  = Integer.parseInt(str[0])-1;
            int floor  = Integer.parseInt(str[1])-1;
            int room   = Integer.parseInt(str[2])-1;
            int person = Integer.parseInt(str[3]);
            array[house][floor][room] += person;
        }
        for(int i = 0; i < array.length; i++){
            if(!(i ==0)){
                System.out.println("####################");
            }
            for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            }
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int x = Integer.parseInt(br.readLine());
        int[][][] array = new int [4][3][10];
        for(int i = 0; i < x; i++){
            String[] str = br.readLine().split(" ");
            int house  = Integer.parseInt(str[0])-1;
            int floor  = Integer.parseInt(str[1])-1;
            int room   = Integer.parseInt(str[2])-1;
            int person = Integer.parseInt(str[3]);
            array[house][floor][room] += person;
        }
        for(int i = 0; i < array.length; i++){
            if(!(i ==0)){
                System.out.println("####################");
            }
            for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            }
        }
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int x = Integer.parseInt(br.readLine());
        int[][][] array = new int [4][3][10];
        for(int i = 0; i < x; i++){
            String[] str = br.readLine().split(" ");
            int house  = Integer.parseInt(str[0])-1;
            int floor  = Integer.parseInt(str[1])-1;
            int room   = Integer.parseInt(str[2])-1;
            int person = Integer.parseInt(str[3]);
            array[house][floor][room] += person;
        }
        for(int i = 0; i < array.length; i++){
            if(!(i ==0)){
                System.out.println("####################");
            }
            for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            }
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int x = Integer.parseInt(br.readLine());
        int[][][] array = new int [4][3][10];
        for(int i = 0; i < x; i++){
            String[] str = br.readLine().split(" ");
            int house  = Integer.parseInt(str[0])-1;
            int floor  = Integer.parseInt(str[1])-1;
            int room   = Integer.parseInt(str[2])-1;
            int person = Integer.parseInt(str[3]);
            array[house][floor][room] += person;
        }
        for(int i = 0; i < array.length; i++){
            if(!(i ==0)){
                System.out.println("####################");
            }
            for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            }
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int x = Integer.parseInt(br.readLine()); x Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int[][][] array = new int [4][3][10]; array new int [4][3][10] 4 3 10 for(int i = 0; i < x; i++){
            String[] str = br.readLine().split(" ");
            int house  = Integer.parseInt(str[0])-1;
            int floor  = Integer.parseInt(str[1])-1;
            int room   = Integer.parseInt(str[2])-1;
            int person = Integer.parseInt(str[3]);
            array[house][floor][room] += person;
        } int i = 0; int i = 0; i 0 i < x i x i++ i++ i {
            String[] str = br.readLine().split(" ");
            int house  = Integer.parseInt(str[0])-1;
            int floor  = Integer.parseInt(str[1])-1;
            int room   = Integer.parseInt(str[2])-1;
            int person = Integer.parseInt(str[3]);
            array[house][floor][room] += person;
        } {
            String[] str = br.readLine().split(" ");
            int house  = Integer.parseInt(str[0])-1;
            int floor  = Integer.parseInt(str[1])-1;
            int room   = Integer.parseInt(str[2])-1;
            int person = Integer.parseInt(str[3]);
            array[house][floor][room] += person;
        } String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int house  = Integer.parseInt(str[0])-1; house Integer.parseInt(str[0])-1 Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 1 int floor  = Integer.parseInt(str[1])-1; floor Integer.parseInt(str[1])-1 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 1 int room   = Integer.parseInt(str[2])-1; room Integer.parseInt(str[2])-1 Integer.parseInt(str[2]) Integer.parseInt Integer str[2] str 2 1 int person = Integer.parseInt(str[3]); person Integer.parseInt(str[3]) Integer.parseInt Integer str[3] str 3 array[house][floor][room] += person array[house][floor][room] array[house][floor] array[house] array house floor room person for(int i = 0; i < array.length; i++){
            if(!(i ==0)){
                System.out.println("####################");
            }
            for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
            if(!(i ==0)){
                System.out.println("####################");
            }
            for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            }
        } {
            if(!(i ==0)){
                System.out.println("####################");
            }
            for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            }
        } if(!(i ==0)){
                System.out.println("####################");
            } !(i ==0) (i ==0) i 0 {
                System.out.println("####################");
            } System.out.println("####################") System.out.println System.out System System.out "####################" for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            } int j = 0; int j = 0; j 0 j < array[i].length j array[i].length array[i] array i array[i].length j++ j++ j {
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            } {
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            } for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                } int k = 0; int k = 0; k 0 k < array[i][j].length k array[i][j].length array[i][j] array[i] array i j array[i][j].length k++ k++ k {
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                } {
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                } System.out.print(" "+array[i][j][k]) System.out.print System.out System System.out " "+array[i][j][k] " " array[i][j][k] array[i][j] array[i] array i j k if(k == array[i][j].length-1){
                        System.out.println("");
                    } k == array[i][j].length-1 k array[i][j].length-1 array[i][j].length array[i][j] array[i] array i j array[i][j].length 1 {
                        System.out.println("");
                    } System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int x = Integer.parseInt(br.readLine());
        int[][][] array = new int [4][3][10];
        for(int i = 0; i < x; i++){
            String[] str = br.readLine().split(" ");
            int house  = Integer.parseInt(str[0])-1;
            int floor  = Integer.parseInt(str[1])-1;
            int room   = Integer.parseInt(str[2])-1;
            int person = Integer.parseInt(str[3]);
            array[house][floor][room] += person;
        }
        for(int i = 0; i < array.length; i++){
            if(!(i ==0)){
                System.out.println("####################");
            }
            for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            }
        }
    }
} public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int x = Integer.parseInt(br.readLine());
        int[][][] array = new int [4][3][10];
        for(int i = 0; i < x; i++){
            String[] str = br.readLine().split(" ");
            int house  = Integer.parseInt(str[0])-1;
            int floor  = Integer.parseInt(str[1])-1;
            int room   = Integer.parseInt(str[2])-1;
            int person = Integer.parseInt(str[3]);
            array[house][floor][room] += person;
        }
        for(int i = 0; i < array.length; i++){
            if(!(i ==0)){
                System.out.println("####################");
            }
            for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            }
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int x = Integer.parseInt(br.readLine());
        int[][][] array = new int [4][3][10];
        for(int i = 0; i < x; i++){
            String[] str = br.readLine().split(" ");
            int house  = Integer.parseInt(str[0])-1;
            int floor  = Integer.parseInt(str[1])-1;
            int room   = Integer.parseInt(str[2])-1;
            int person = Integer.parseInt(str[3]);
            array[house][floor][room] += person;
        }
        for(int i = 0; i < array.length; i++){
            if(!(i ==0)){
                System.out.println("####################");
            }
            for(int j = 0; j < array[i].length; j++){
  
                for(int k = 0; k < array[i][j].length; k++){
                    System.out.print(" "+array[i][j][k]);
                    if(k == array[i][j].length-1){
                        System.out.println("");
                    }
                }
            }
        }
    }
}