A, B = map(int, input().split()) C = range(A, B) for i in C: if i in int(3) or i % 3 == 0: print(i)