#include<bits/stdc++.h>
using namespace std;
int main(){
for(int i=10;i<=1000;i++){
if(i%2==0&&i%3==0&&i%7==0)
cout<<i<<endl;
}
}
/**************************************************************
Problem: 1090
User: fandaohan
Language: C++
Result: Accepted
Time:6 ms
Memory:2072 kb
****************************************************************/