from typing import Union


def int_or_str(argument: str) -> Union[int, str]:
    """Return the argument either as integer (if it can be converted
    to int) or as string.
    """
    try:
        return int(argument)
    except ValueError:
        return argument