A, B = map(int, input().split()) list1 = [] a = 0 for i in range(B+1): a = i*5 if a != 0: list1.append(a) for i in range(A): a = a+1 list1.append(a) #list2 = list(set(list1)) for i in range(len(list1)): print(list1[i])