import strutils, sequtils let ab = stdin.readLine.split.map(parseInt) for i in ab[0] .. ab[1]: if ('3' in $i) or (i mod 3 == 0): echo i