#fabnaci
m=0
n=1
print m,n, 
c=0
i=1
for i in range(1,7):
    c=m+n
    m=n
    n=c
    print c,
    
 

#fabnaci
m=0
n=1
print m,n, 
c=0
i=1
for i in range(1,7):
    c=m+n
    m=n
    n=c
    print c,
    
 
