st, en = input().split() st, en = int(st), int(en) def solve(st, en): for i in range(st, en): if i % 3 == 0 or "3" in str(i): print(i) solve solve(st, en)