A palindrome is a word (or sentence) that reads the same backwards as forwards, e.g. madam. According to the Guiness book of world records, the longest palindrome word in the world is saippuakivikauppias (19 letters), which is Finnish for a dealer in lye (caustic soda).
Write a program that finds palindromes in a file. The file contains words, one per line and your program finds and returns palindromes in that file.
The only input is a file name. The file contains (dutch) words, one per line. Eg:
aaks
aalbeke
aalburg
aalsmeerder
aarsele
aartselarenaar
aborigines
abruzzees
abruzzen
absurdistan
...
The palindromes in the file, one per line. Eg:
digid
estse
...
Input:
woordenlijst.txt
Output:
digid
estse