def pattern_to_emoji(pattern, print_it=True):
    """ convert the pattern to color emojis. """
    color_map = {"C": "🟩", "M": "🟨", "X": "⬛️"}

    emojis = list()
    for pat in pattern:
        emojis.append(color_map.get(pat))

    if print_it:
        print(' '.join(emojis))
    else:
        return emojis