def main(): A, B = map(int, input().split()) max_ = 1 * A + 5 * B coin = [5] * B price = 0 if A >= 4: for i in range(1, max_ + 1): print(i) else: for i in range(1, A + 1): print(i) for i in coin: price += i print(price) for j in range(1, A + 1): print(price + j) main()