# coding: utf-8 start_point,end_point = map(int,input().split()) for i in range(start_point,end_point): if i % 3 == 0 or str(i) in "3": print(i)