def get_opponent(table: tuple[str, str], char: str) -> str:
    row, col = get_position(table, char.upper())
    if row == 1:
        return table[0][col]
    else:
        return table[1][col] if row == 0 else char