public static void checkAdjacent(char[][] board, boolean[][] dp,
			boolean[][] visited, int i, int j) {
		if (i <= 0 || i >= board.length - 1 || j <= 0
				|| j >= board[0].length - 1)
			return;
		if (visited[i][j] == true)
			return;
		if (board[i][j] == 'X')
			return;

		visited[i][j] = true;
		if (board[i][j] == 'O') {
			dp[i][j] = true;
			checkAdjacent(board, dp, visited, i + 1, j);
			checkAdjacent(board, dp, visited, i - 1, j);
			checkAdjacent(board, dp, visited, i, j + 1);
			checkAdjacent(board, dp, visited, i, j - 1);
		}
	}