Put words ending with the letter i to a txt file