#include using namespace std; int main() { int a,b,temp; cin>>a>>b; for(;a<=b;a++){ temp=a; while(temp>0){ if(temp%10==3||a%3==0){ cout<