X=int(input())
c=1
while c<=7:
     if X%2!=0:
          print("%d" %X)
          X=X+2
     else:
          X=X+1
     c=c+1

X=int(input())
c=1
while c<=7:
     if X%2!=0:
          print("%d" %X)
          X=X+2
     else:
          X=X+1
     c=c+1
