#include int main(){ int a,b,I; scanf("%d%d",&a,&b); for(I=a;I<=b;I++){ if(I%3==0||I%10==3){ printf("%d\n",I); } } return 0; }