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.
    """
    if len(word) == 0:
        return [""]

    # step 1
    first = word[0]
    rest = word[1:]

    # step 2
    rest_strings = gen_all_strings(rest)

    # step 3
    strings = list(rest_strings)

    for string in strings:
        for position in range(len(string)):
            new_string = string[:position] + first + string[position:]
            rest_strings.append(new_string)
        rest_strings.append(string + first)
    return rest_strings