input: def play_tic_tac_toe() -> str:
      """
      Function to simulate a game of Tic Tac Toe where two players take turns to place
      their icons ('X' and 'O') on a 3x3 board. The game continues until one player wins
      by getting three of their icons in a row horizontally, vertically, or diagonally,
      or until all spaces are filled resulting in a tie.
      >>> play_tic_tac_toe()
      'X Wins! Congratulations!'
      """
output:     board = [[' ' for _ in range(3)] for _ in range(3)]
      current_player = 'X'
  
      def print_board():
          for row in board:
              print('|'.join(row))
              print('-' * 5)
  
      def check_winner():
          for row in board:
              if row[0] == row[1] == row[2] != ' ':
                  return row[0]
          for col in range(3):
              if board[0][col] == board[1][col] == board[2][col] != ' ':
                  return board[0][col]
          if board[0][0] == board[1][1] == board[2][2] != ' ':
              return board[0][0]
          if board[0][2] == board[1][1] == board[2][0] != ' ':
              return board[0][2]
          return None
  
      def is_board_full():
          return all(cell != ' ' for row in board for cell in row)
  
      while True:
          print_board()
          row, col = map(int, input(f"Player {current_player}, enter row and column (0, 1, 2): ").split())
          if board[row][col] == ' ':
              board[row][col] = current_player
              winner = check_winner()
              if winner:
                  print_board()
                  return f"{winner} Wins! Congratulations!"
              if is_board_full():
                  print_board()
                  return "It's a Tie!"
              current_player = 'O' if current_player == 'X' else 'X'
          else:
              print("Cell already taken, try again.")