from itertools import cycle
greeting = ['Hello', 'World!', '\n']
for word in cycle(greeting):
print word,