def gen_all_strings(word):
    """
    Generate all strings that can be composed from the letters in word
    in any order.

    Returns a list of all strings that can be formed from the letters
    in word.

    This function should be recursive.
    """
    
    # base case with no length word
    if len(word) == 0:
        return [""]
    
    # recursive case
    head = word[0]
    tail = word[1: ]
    # keep track of a master list while generating sub list
    master_list = []
    sub_list = gen_all_strings(tail)
    # add sub list to master list
    master_list.extend(sub_list)
    # for each sub list word add to master list a combination of all
    # head character positions in sub word
    for sub_word in sub_list:
        for index in range(len(sub_word) + 1):
            master_list.append(sub_word[:index] + head + sub_word[index: ])
    
    return master_list