x,y = [int(i) for i in input().split()] for j in range(x,y): if j % 3 == 0: print(j)