#include using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); int a,b; cin>>a>>b; string s; bool three; for(int j;a<=b;++a){ j=0; three=false; s=to_string(a); for(auto&i:s){ if(i=='3')three=true; else j+=i-'0'; } if(three||j%3==0)cout<