A, B = map(int, input().split()) for i in range(A,B+1): word = str(i) if '3' in word == True: print(i)