# generator function for the fibonacci sequence
def fibonacci():
a, b = 0, 1
while True:
yield a
a, b = b, a + b
def main():
term = int(input('nth term:'))
for index, i in enumerate(fibonacci()):
if index <= term:
print(i)
else:
break
if __name__ == '__main__':
main()