#include <iostream>
using namespace std; int isPrime(int n) { for (int i = 2; i*i <= n; ++i) if (n%i == 0) return 0; return 1; }
int main() { int m, n; cin >> m >> n; int ct = 0; int j = 0; for (int i = 2;; ++i){ if (isPrime(i)){ ct++; if (ct >=m && ct <= n){ if (++j % 10 == 0) cout << i << endl; else if (ct == n) cout << i; else cout << i << ' '; } if (ct > n) break; } } return 0; }