def gen_user_word(word, user_word, user_char, sep="_"):
    """
    for each occurrences of user_char in word, replace '_' by
    user_char in user_word
    returns the new user_word
    """
    indexes = [i for i, letter in enumerate(word) if letter == user_char]
    for i in indexes:
        user_word[i] = user_char
    return user_word