#include <bits/stdc++.h>
using namespace std;
// http://www.geeksforgeeks.org/puzzle-16-100-doors/
int main(){
int n;
// cout<<"Enter the num of doors"<<endl;
cin>>n;
vector<int> a;
for(int i=1;i<=n;i++){
int count=0;
for(int j=1;j<=n;j++){
//he toggles the ith door when going jth time
//if i is divisible by j
//eg: 3rd door is toggled for 1st,3rd time
if(i%j==0){
count++;
}
}
if(count%2!=0){
a.push_back(i); //doors were initially closed
//after even operations it will still stay closed
}
}
for(int i=0;i<a.size();i++){
cout<<a[i]<<" ";
}
return 0;
}