public void solve() throws IOException {
    int n = nextInt();
    char[][] arr = new char[n][n];
    int[][] ans = new int[n][n];
    for (int x = 0; x < n; x++)
      for (int y = 0; y < n; y++)
        ans[x][y] = (arr[x][y] == '#') ? 0 : -1;
    fill(ans, n - 1, n - 1);
  }