import re


def check_convert_input(user_inputs: list):
    """
    Check input for erroneous formatting.
    If input is clean, convert it to more useful format.

    Args:
        guesses (dict): {
            'word1':'XXXXX',
            'word2':'XXXXX',
            etc.
        }

    Returns:
        guesses (dict): {
            'word1':[X,X,X,X,X],
            'word2':[X,X,X,X,X],
            etc.
        }
        bad_input (bool): True if input is incorrect format.
    """
    guesses = {}
    bad_input = False
    for user_input in user_inputs:
        if re.match(pattern='[A-Z]{5}[-][0-2]{5}', string=user_input):
            guesses[user_input.split('-')[0]] = [int(x) for x in list(user_input.split('-')[1])]
        else:
            bad_input = True
    return guesses, bad_input