public void print(int[][] dp) {
        for (int[] arr : dp) {
            for (int i : arr) {
                System.out.print(i + " ");
            }
            System.out.println();
        }
        System.out.println("-----------------------------------");
    }