#include <iostream>
#include <cmath>
usingnamespace std;
bool is_hamming (int n) {
if (n == 1) returntrue;
if (n%2==0 or n%3==0 or n%5==0) {
for (int i = 2; i*i < n; ++i) {
if (n%i == 0) {
if (i%2 != 0 and i%3!=0 and i%5!=0) returnfalse;
}
if (n%(n/i) == 0) {
if ((n/i)%2 != 0 and (n/i)%3!=0 and (n/i)%5!=0) returnfalse;
}
}
returntrue;
}
returnfalse;
}
int main () {
int n;
while (cin >> n) {
int count = 0;
int i = 1;
bool first = true;
while (count < n) {
if (is_hamming(i)) {
if (not first) cout << ",";
cout << i;
++count;
first = false;
}
++i;
}
}
}