import sequtils, strutils var a, b: int (a, b) = stdin.readLine.split.map parseInt for i in a .. b: if i mod 3 == 0: echo i continue if '3' in $i: echo i