#coin A,B=(int(i) for i in input().split()) if A==0: i=1 while i<=B: print(5*i) i+=1 else: i=0 while i<=B: if i == 0: j=1 else: j=0 while j<=A and j<5: print(i*5+j) j+=1 i+=1 if A>4: i-=1 while j<=A: print(i*5+j) j+=1