public int shortestLadder(String[] level, int coinRow, int coinColumn) {
        for (int i = 0; i < 50; i++) {
            boolean[][] visited = new boolean[level.length][level[0].length()];
            this.level = level;
            L = i;
            dfs(visited, 0, level.length - 1);
            if (visited[coinRow - 1][coinColumn - 1]) {
                return i;
            }
        }
        return -1;
    }