def user_input_handling_function_second(dictionary):
    print()
    user_input = input('Enter: ')
    print()
    good_to_go = 'no'
    errors = []
    lict = []
    while (good_to_go == 'no'):
        for key in dictionary:
            lict.append(key)
        for element in user_input:
            if (element not in lict):
                print('The form can only contain a combination of the characters that represent the lists of characters.')
                errors.append('yes')
                break
        if (len(user_input) < 2):
            print("The form is too short. It can't be less than two-characters long.")
            errors.append('yes')
        if (len(user_input) > 8):
            print("The form is too long. It can't be more than eight-characters long.")
            errors.append('yes')
        if ('yes' in errors):
            good_to_go = 'no'
            errors = []
            print()
            user_input = input('Re-enter: ')
            print()
        else:
            good_to_go = 'yes'
    return user_input
def user_input_handling_function_second(dictionary):
    print()
    user_input = input('Enter: ')
    print()
    good_to_go = 'no'
    errors = []
    lict = []
    while (good_to_go == 'no'):
        for key in dictionary:
            lict.append(key)
        for element in user_input:
            if (element not in lict):
                print('The form can only contain a combination of the characters that represent the lists of characters.')
                errors.append('yes')
                break
        if (len(user_input) < 2):
            print("The form is too short. It can't be less than two-characters long.")
            errors.append('yes')
        if (len(user_input) > 8):
            print("The form is too long. It can't be more than eight-characters long.")
            errors.append('yes')
        if ('yes' in errors):
            good_to_go = 'no'
            errors = []
            print()
            user_input = input('Re-enter: ')
            print()
        else:
            good_to_go = 'yes'
    return user_input