def check_type(value):
    """
    Checks the type of character of the input.

    :param value:   character to check

    :returns:    0 if letter, 2 if space, or 1 if number
    """
    if value.isalpha():
        return 0
    elif value.isspace():
        return 2
    else:
        return 1
