def save_ordered_set(oset, filename):
    """
    Save an OrderedSet object as a text file of words.
    """
    with open(filename, 'w', encoding='utf-8') as out:
        for word in oset:
            print(word, file=out)
