A, B = map(int, input().sprit()) for i in range(A,B+1): word = str(i) for value in word: if word[value] == '3': print(i)