word_set?=?{'apple',?'doctor',?'day',?'dummy'}
sentence?=?'An?apple?a?day?keeps?the?doctor?away'
for?word?in?sentence.split():
if?word.lower()?in?word_set:
print(word)