A, B = map(int, input().split()) for i in range(1, A + B * 5 + 1): if i >= B * 5 or i % 5 <= A: print(i)