A, B = map(int, input().split()) for i in (A,B+1): word = i(str) if '3' in word == True: print(i)