import sequtils, strutils var a: seq[int] = stdin.readline.split.map(parseInt) for i in a[0]..a[1]: if i mod 3 == 0 or count(intToStr(i), '3') > 0: echo i