#include<bits/stdc++.h>
using namespace std;

long long int N, a[1417] = {2, 7, 17, 37, 47, 67, 97, 107, 127, 137, 157, 167, 197, 227, 257, 277, 307, 317, 337, 347, 367, 397, 457, 467, 487, 547, 557, 577, 587, 607, 617, 647, 677, 727, 757, 787, 797, 827, 857, 877, 887, 907, 937, 947, 967, 977, 997, 1087, 1097, 1117, 1187, 1217, 1237, 1277, 1297, 1307, 1327, 1367, 1427, 1447, 1487, 1567, 1597, 1607, 1627, 1637, 1657, 1667, 1697, 1747, 1777, 1787, 1847, 1867, 1877, 1907, 1987, 1997, 2017, 2027, 2087, 2137, 2207, 2237, 2267, 2287, 2297, 2347, 2357, 2377, 2417, 2437, 2447, 2467, 2477, 2557, 2617, 2647, 2657, 2677, 2687, 2707, 2767, 2777, 2797, 2837, 2857, 2887, 2897, 2917, 2927, 2957, 3037, 3067, 3137, 3167, 3187, 3217, 3257, 3307, 3347, 3407, 3457, 3467, 3517, 3527, 3547, 3557, 3607, 3617, 3637, 3677, 3697, 3727, 3767, 3797, 3847, 3877, 3907, 3917, 3947, 3967, 4007, 4027, 4057, 4127, 4157, 4177, 4217, 4297, 4327, 4337, 4357, 4397, 4447, 4457, 4507, 4517, 4547, 4567, 4597, 4637, 4657, 4787, 4817, 4877, 4937, 4957, 4967, 4987, 5077, 5087, 5107, 5147, 5167, 5197, 5227, 5237, 5297, 5347, 5387, 5407, 5417, 5437, 5477, 5507, 5527, 5557, 5647, 5657, 5717, 5737, 5807, 5827, 5857, 5867, 5897, 5927, 5987, 6007, 6037, 6047, 6067, 6197, 6217, 6247, 6257, 6277, 6287, 6317, 6337, 6367, 6397, 6427, 6547, 6577, 6607, 6637, 6737, 6827, 6857, 6907, 6917, 6947, 6967, 6977, 6997, 7027, 7057, 7127, 7177, 7187, 7207, 7237, 7247, 7297, 7307, 7417, 7457, 7477, 7487, 7507, 7517, 7537, 7547, 7577, 7607, 7687, 7717, 7727, 7757, 7817, 7867, 7877, 7907, 7927, 7937, 8017, 8087, 8117, 8147, 8167, 8237, 8287, 8297, 8317, 8377, 8387, 8447, 8467, 8527, 8537, 8597, 8627, 8647, 8677, 8707, 8737, 8747, 8807, 8837, 8867, 8887, 9007, 9067, 9127, 9137, 9157, 9187, 9227, 9257, 9277, 9337, 9377, 9397, 9437, 9467, 9497, 9547, 9587, 9677, 9697, 9767, 9787, 9817, 9857, 9887, 9907, 9967, 10007, 10037, 10067, 10177, 10247, 10267, 10337, 10357, 10427, 10457, 10477, 10487, 10567, 10597, 10607, 10627, 10657, 10667, 10687, 10837, 10847, 10867, 10937, 10957, 10987, 11027, 11047, 11057, 11087, 11117, 11177, 11197, 11257, 11287, 11317, 11437, 11447, 11467, 11497, 11527, 11587, 11597, 11617, 11657, 11677, 11717, 11777, 11807, 11827, 11867, 11887, 11897, 11927, 11987, 12007, 12037, 12097, 12107, 12157, 12197, 12227, 12277, 12347, 12377, 12437, 12457, 12487, 12497, 12517, 12527, 12547, 12577, 12637, 12647, 12697, 12757, 12907, 12917, 12967, 13007, 13037, 13127, 13147, 13177, 13187, 13217, 13267, 13297, 13327, 13337, 13367, 13397, 13417, 13457, 13477, 13487, 13537, 13567, 13577, 13597, 13627, 13687, 13697, 13757, 13807, 13877, 13907, 13967, 13997, 14057, 14087, 14107, 14177, 14197, 14207, 14327, 14347, 14387, 14407, 14437, 14447, 14537, 14557, 14627, 14657, 14717, 14737, 14747, 14767, 14797, 14827, 14867, 14887, 14897, 14947, 14957, 15017, 15077, 15107, 15137, 15187, 15217, 15227, 15277, 15287, 15307, 15377, 15427, 15467, 15497, 15527, 15607, 15647, 15667, 15727, 15737, 15767, 15787, 15797, 15817, 15877, 15887, 15907, 15937, 16007, 16057, 16067, 16087, 16097, 16127, 16187, 16217, 16267, 16417, 16427, 16447, 16477, 16487, 16547, 16567, 16607, 16657, 16747, 16787, 16927, 16937, 16987, 17027, 17047, 17077, 17107, 17117, 17137, 17167, 17207, 17257, 17317, 17327, 17377, 17387, 17417, 17467, 17477, 17497, 17597, 17627, 17657, 17707, 17737, 17747, 17807, 17827, 17837, 17957, 17977, 17987, 18047, 18077, 18097, 18127, 18217, 18257, 18287, 18307, 18367, 18397, 18427, 18457, 18517, 18587, 18617, 18637, 18757, 18787, 18797, 18917, 18947, 19037, 19087, 19157, 19207, 19237, 19267, 19387, 19417, 19427, 19447, 19457, 19477, 19507, 19577, 19597, 19687, 19697, 19717, 19727, 19777, 19867, 19927, 19937, 19997, 20047, 20107, 20117, 20147, 20177, 20287, 20297, 20327, 20347, 20357, 20407, 20477, 20507, 20627, 20707, 20717, 20747, 20807, 20857, 20887, 20897, 20947, 21017, 21067, 21107, 21157, 21187, 21227, 21247, 21277, 21317, 21347, 21377, 21397, 21407, 21467, 21487, 21517, 21557, 21577, 21587, 21617, 21647, 21727, 21737, 21757, 21767, 21787, 21817, 21937, 21977, 21997, 22027, 22037, 22067, 22147, 22157, 22247, 22277, 22307, 22367, 22397, 22447, 22567, 22637, 22697, 22717, 22727, 22777, 22787, 22807, 22817, 22877, 22907, 22937, 23017, 23027, 23057, 23087, 23117, 23167, 23197, 23227, 23297, 23327, 23357, 23417, 23447, 23497, 23537, 23557, 23567, 23627, 23677, 23687, 23747, 23767, 23827, 23857, 23887, 23917, 23957, 23977, 24007, 24077, 24097, 24107, 24137, 24197, 24247, 24317, 24337, 24407, 24517, 24527, 24547, 24677, 24697, 24767, 24847, 24877, 24907, 24917, 24967, 24977, 25037, 25057, 25087, 25097, 25117, 25127, 25147, 25237, 25247, 25307, 25357, 25367, 25447, 25457, 25537, 25577, 25657, 25667, 25717, 25747, 25847, 25867, 25997, 26017, 26107, 26177, 26227, 26237, 26267, 26297, 26317, 26347, 26357, 26387, 26407, 26417, 26437, 26497, 26557, 26597, 26627, 26647, 26687, 26717, 26737, 26777, 26927, 26947, 26987, 27017, 27067, 27077, 27107, 27127, 27197, 27277, 27337, 27367, 27397, 27407, 27427, 27437, 27457, 27487, 27527, 27617, 27647, 27697, 27737, 27767, 27817, 27827, 27847, 27917, 27947, 27967, 27997, 28027, 28057, 28087, 28097, 28277, 28297, 28307, 28387, 28447, 28477, 28517, 28537, 28547, 28597, 28607, 28627, 28657, 28687, 28697, 28807, 28817, 28837, 28867, 28927, 29017, 29027, 29077, 29137, 29147, 29167, 29207, 29287, 29297, 29327, 29347, 29387, 29437, 29527, 29537, 29567, 29587, 29717, 29837, 29867, 29917, 29927, 29947, 30047, 30097, 30137, 30187, 30197, 30307, 30347, 30367, 30427, 30467, 30497, 30517, 30557, 30577, 30637, 30677, 30697, 30707, 30727, 30757, 30817, 30937, 30977, 31147, 31177, 31237, 31247, 31267, 31277, 31307, 31327, 31337, 31357, 31387, 31397, 31477, 31517, 31547, 31567, 31607, 31627, 31657, 31667, 31687, 31727, 31817, 31847, 31907, 31957, 32027, 32057, 32077, 32117, 32237, 32257, 32297, 32327, 32377, 32467, 32497, 32507, 32537, 32587, 32647, 32687, 32707, 32717, 32797, 32887, 32917, 32957, 32987, 33037, 33107, 33247, 33287, 33317, 33347, 33377, 33427, 33457, 33487, 33547, 33577, 33587, 33617, 33637, 33647, 33757, 33767, 33797, 33827, 33857, 33937, 33967, 33997, 34057, 34127, 34147, 34157, 34217, 34267, 34297, 34327, 34337, 34367, 34457, 34487, 34537, 34607, 34667, 34687, 34747, 34757, 34807, 34847, 34877, 34897, 35027, 35107, 35117, 35227, 35257, 35267, 35317, 35327, 35407, 35437, 35447, 35507, 35527, 35537, 35597, 35617, 35677, 35747, 35797, 35837, 35897, 35977, 36007, 36017, 36037, 36067, 36097, 36107, 36137, 36187, 36217, 36277, 36307, 36457, 36467, 36497, 36527, 36587, 36607, 36637, 36677, 36697, 36767, 36787, 36847, 36857, 36877, 36887, 36947, 36997, 37057, 37087, 37097, 37117, 37217, 37277, 37307, 37337, 37357, 37397, 37447, 37507, 37517, 37537, 37547, 37567, 37607, 37657, 37717, 37747, 37847, 37897, 37907, 37957, 37967, 37987, 37997, 38047, 38167, 38177, 38197, 38237, 38287, 38317, 38327, 38377, 38447, 38557, 38567, 38677, 38707, 38737, 38747, 38767, 38867, 38917, 38977, 39047, 39097, 39107, 39157, 39217, 39227, 39317, 39367, 39397, 39607, 39667, 39727, 39827, 39847, 39857, 39877, 39887, 39937, 40037, 40087, 40127, 40177, 40237, 40277, 40357, 40387, 40427, 40487, 40507, 40577, 40597, 40627, 40637, 40697, 40787, 40847, 40867, 40897, 40927, 41017, 41047, 41057, 41077, 41117, 41177, 41227, 41257, 41357, 41387, 41467, 41507, 41597, 41617, 41627, 41647, 41687, 41737, 41777, 41887, 41897, 41927, 41947, 41957, 42017, 42157, 42187, 42197, 42227, 42257, 42307, 42337, 42397, 42407, 42437, 42457, 42467, 42487, 42557, 42577, 42667, 42677, 42697, 42727, 42737, 42767, 42787, 42797, 42937, 42967, 43037, 43067, 43117, 43177, 43207, 43237, 43397, 43427, 43457, 43487, 43517, 43577, 43597, 43607, 43627, 43717, 43777, 43787, 43867, 43987, 43997, 44017, 44027, 44087, 44207, 44257, 44267, 44357, 44417, 44497, 44507, 44537, 44587, 44617, 44647, 44657, 44687, 44777, 44797, 44867, 44887, 44917, 44927, 44987, 45007, 45077, 45127, 45137, 45197, 45247, 45307, 45317, 45337, 45377, 45427, 45497, 45557, 45587, 45667, 45677, 45697, 45707, 45737, 45757, 45767, 45817, 45827, 45887, 46027, 46147, 46187, 46237, 46307, 46327, 46337, 46447, 46457, 46477, 46507, 46567, 46687, 46727, 46747, 46757, 46807, 46817, 46867, 46877, 46957, 46997, 47017, 47057, 47087, 47137, 47147, 47207, 47237, 47287, 47297, 47317, 47387, 47407, 47417, 47497, 47507, 47527, 47657, 47717, 47737, 47777, 47797, 47807, 47837, 47857, 47917, 47947, 47977, 48017, 48157, 48187, 48197, 48247, 48337, 48397, 48407, 48437, 48487, 48497, 48527, 48647, 48677, 48757, 48767, 48787, 48817, 48847, 48857, 48907, 48947, 49037, 49057, 49117, 49157, 49177, 49207, 49277, 49297, 49307, 49367, 49417, 49477, 49537, 49547, 49597, 49627, 49667, 49697, 49727, 49747, 49757, 49787, 49807, 49877, 49927, 49937, 49957, 50047, 50077, 50087, 50147, 50177, 50207, 50227, 50287, 50377, 50387, 50417, 50497, 50527, 50587, 50627, 50647, 50707, 50767, 50777, 50857, 50867, 50957, 51047, 51137, 51157, 51197, 51217, 51257, 51287, 51307, 51347, 51407, 51427, 51437, 51487, 51517, 51577, 51607, 51637, 51647, 51767, 51787, 51797, 51817, 51827, 51907, 51977, 52027, 52057, 52067, 52127, 52147, 52177, 52237, 52267, 52387, 52457, 52517, 52567, 52627, 52667, 52697, 52727, 52747, 52757, 52807, 52817, 52837, 52937, 52957, 52967, 53017, 53047, 53077, 53087, 53117, 53147, 53197, 53267, 53327, 53377, 53407, 53437, 53507, 53527, 53597, 53617, 53657, 53717, 53777, 53857, 53887, 53897, 53917, 53927, 53987, 54037, 54167, 54217, 54277, 54287, 54347, 54367, 54377, 54437, 54497, 54517, 54547, 54577, 54617, 54647, 54667, 54727, 54767, 54787, 54877, 54907, 54917, 55057, 55117, 55127, 55147, 55207, 55217, 55337, 55457, 55487, 55547};

int main(){
    scanf("%lld", &N);
    for(int i = 0; i < N; ++i){
        cout << a[i] << " ";
    }
    return 0;
}


Measured memory_bytes: 256