#include<bits/stdc++.h> using namespace std; int main(){ int i; cin>>i; for(int i=1;i<=100;i++) if(i%3==0) cout<<i<<" "; return 0; }