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