#include using namespace std; #define REP(i,N) for(i=0;i P; typedef struct{ int first; int second; int third; }T; //昇順 bool comp_Se(T& l, T& r){ return l.second < r.second; } bool number3(ll n){ while(n!=0){ if(n%10 == 3) return true; n/=10; } return false; } int main(void){ ll A,B; cin >> A >> B; for(ll i = A; i<=B;i++){ if(i%3==0 || number3(i))cout << i <