#include <iostream>
using namespace std;
int main(){
int n,i=1;
//Citire date
cin >> n;
while(n){
int suma = 0;
//Calculare suma divizori
for(int div=1;div<=i/2;div++)
if(i%div==0){
suma += div;
}
//Determinare daca numarul e magic
if(i==suma){
cout << i << " ";
n--;
}
//Treci la uramatorul numar
i++;
}
}