#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; typedef pair pii; typedef vector vll; typedef vector vi; typedef vector> vvi; typedef vector> vvll; const ll inf = 1e16; const ll md = 1000000007; bool aho(int x){ if(x%3==0) return true; while(x){ if(x%10==3) return true; x/=10; } return false; } int main() { int a,b; cin>>a>>b; for(int i=a;i<=b;i++) if(aho(i)) cout<