from typing import Union


def __is_number__(s: str) -> Union[int, float, str]:
    """String converter.

    Args:
        s (str): Input string.

    Returns:
        Union[int, float, str]: Convert an input string into int or float
        if possible, or it would return the input string itself.
    """
    if s.isdigit():  # judge if str is an int.
        return int(s)
    else:
        try:
            return float(s)  # convert into float.
        except ValueError:
            return s