#include <bits/stdc++.h>

int ri() {
	int n;
	scanf("%d", &n);
	return n;
}


int main() {
	int n = ri();
	if (n == 3) {
		puts("6 10 15");
		return 0;
	}
	std::vector<int> res;
	for (int i = 1; i <= 10000 && (int) res.size() < n; i++) {
		if (!(i % 2) + !(i % 3) + !(i % 5) >= 2) res.push_back(i);
	}
	assert((int) res.size() == n);
	
	for (int i = 0; i < n; i++) {
		if (i) printf(" ");
		printf("%d", res[i]);
	}
	puts("");
	
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define all(v)			((v).begin()), ((v).end())
#define sz(v)			((int)((v).size()))
typedef long long ll;
typedef vector<int> vi;
typedef vector<pair<ll , int> > vpli;
typedef set<char> st;
typedef stack<int> s;
typedef deque<int> dq;
typedef queue<int> q;
int main (){
  string s;
  cin >> s;
  reverse(all(s));
  for(int i = 0; i<sz(s); i++){
    if(s[i] == '6'){s[i] = '9';}
    else if(s[i] == '9'){s[i] = '6';}
  }
  cout<<s<<endl;
}

