a,b=map(int, input().split()) def check(num): if num <=64: if num%3==0: print(num) else: check(num) for i in range(a,b+1): check(i)