
with open('words.md', 'r') as f:
    txt = f.readlines()

f = open('words_test.md', 'w')
for s in txt:
    words = s.split(' ')
    if words[0] == '##':
        f.write(s + '\n')
    else:
        f.write(words[0] + '\n')
f.close()
