class fibonacci(object):
	def __init__(self):
		self.fn2=1
		self.fn1=1
	def next(self):
		self.fn1, self.fn2, oldfn2 = self.fn1+self.fn2, self.fn1, self.fn2
		return oldfn2
	def __iter__(self):
		return self

if __name__=='__main__' :
	from sys import argv
	top = 20
	if len(argv)>1 :
		top = int(argv[-1])
	f=fibonacci()
	for i in f :
		print i
		if i>top :
			break

