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 [""]
    else:
        rest_strings = gen_all_strings(word[1:])
        ans = list(rest_strings)
        for string_item in rest_strings:
            for idx in range(len(string_item)):
                ans.append(string_item[:idx] + word[0] + string_item[idx:])
            ans.append(string_item + word[0])
        return ans