def get_color_pattern(input_word: str, solution: str) -> str:
    """
    Given an input word and a solution, generates the resulting
    color pattern.
    """
    color_pattern = [0 for _ in range(5)]
    sub_solution = list(solution)
    for index, letter in enumerate(list(input_word)):
        if letter == solution[index]:
            color_pattern[index] = 2
            sub_solution[index] = "_"
    for index, letter in enumerate(list(input_word)):
        if letter in sub_solution and color_pattern[index] != 2:
            color_pattern[index] = 1
            sub_solution[sub_solution.index(letter)] = "_"
    color_pattern = "".join([str(c) for c in color_pattern])
    return color_pattern