Given an m x n board of 'X' and 'O' characters, capture all regions of 'O' that are fully surrounded by 'X' by flipping them to 'X'. An 'O' region is safe (not captured) if any of its cells touches the border. Return the resulting board. The input is JSON {board}.
Input: JSON {board}.
Output: Nested array — the updated board.
Input: {"board":[["X","X","X"],["X","O","X"],["X","X","X"]]}
Output: [["X","X","X"],["X","X","X"],["X","X","X"]]
Explanation: The enclosed O is captured.Input: {"board":[["O"]]}
Output: [["O"]]
Explanation: Border O stays.Input: {"board":[["X","O","X"],["O","O","O"],["X","O","X"]]}
Output: [["X","O","X"],["O","O","O"],["X","O","X"]]
Explanation: All Os touch the border.1<=rows,cols<=200cells are 'X' or 'O'