from typing import Union


def transfrom_operand(operand: str) -> Union[str, int, bool]:
    """Transforms operand."""
    result = operand.strip()

    if result.isdigit():
        result = int(result)

    elif result in ['True', 'true', 'Yes', 'yes', 'T', 't', 'N', 'n']:
        result = True

    elif result in ['False', 'false', 'No', 'no', 'F', 'f', 'N', 'n']:
        result = False

    elif result.startswith('"') and result.endswith('"'):
        result = result[1:-1]

    return result