p=[11,31,41,61,71,101,131,151,181,191,211,241,251,271,281,311,331,401,421,431,461,491,521,541,571,601,631,641,661,691,701,751,761,811,821,881,911,941,971,991,1021,1031,1051,1061,1091,1151,1171,1181,1201,1231,1291,1301,1321,1361,1381,1451,1471,1481,1511,1531,1571,1601,1621,1721,1741,1801,1811,1831,1861,1871,1901,1931,1951,2011,2081,2111,2131,2141,2161,2221,2251,2281,2311,2341,2351,2371,2381,2411,2441,2521,2531,2551,2591,2621,2671,2711,2731,2741,2791,2801,2851,2861,2971,3001,3011,3041,3061,3121,3181,3191,3221,3251,3271,3301,3331,3361,3371,3391,3461,3491,3511,3541,3571,3581,3631,3671,3691,3701,3761,3821,3851,3881,3911,3931,4001,4021,4051,4091,4111,4201,4211,4231,4241,4261,4271,4391,4421,4441,4451,4481,4561,4591,4621,4651,4691,4721,4751,4801,4831,4861,4871,4931,4951,5011,5021,5051,5081,5101,5171,5231,5261,5281,5351,5381,5431,5441,5471,5501,5521,5531,5581,5591,5641,5651,5701,5711,5741,5791,5801,5821,5851,5861,5881,5981,6011,6091,6101,6121,6131,6151,6211,6221,6271,6301,6311,6361,6421,6451,6481,6491,6521,6551,6571,6581,6661,6691,6701,6761,6781,6791,6841,6871,6911,6961,6971,6991,7001,7121,7151,7211,7321,7331,7351,7411,7451,7481,7541,7561,7591,7621,7681,7691,7741,7841,7901,7951,8011,8081,8101,8111,8161,8171,8191,8221,8231,8291,8311,8431,8461,8501,8521,8581,8641,8681,8731,8741,8761,8821,8831,8861,8941,8951,8971,9001,9011,9041,9091,9151,9161,9181,9221,9241,9281,9311,9341,9371,9391,9421,9431,9461,9491,9511,9521,9551,9601,9631,9661,9721,9781,9791,9811,9851,9871,9901,9931,9941,10061,10091,10111,10141,10151,10181,10211,10271,10301,10321,10331,10391,10501,10531,10601,10631,10651,10691,10711,10771,10781,10831,10861,10891,11071,11131,11161,11171,11251,11261,11311,11321,11351,11411,11471,11491,11551,11621,11681,11701,11731,11801,11821,11831,11941,11971,11981,12011,12041,12071,12101,12161,12211,12241,12251,12281,12301,12391,12401,12421,12451,12491,12511,12541,12601,12611,12641,12671,12721,12781,12791,12821,12841,12911,12941,13001,13121,13151,13171,13241,13291,13331,13381,13411,13421,13441,13451,13591,13681,13691,13711,13721,13751,13781,13831,13841,13901,13921,13931,14011,14051,14071,14081,14221,14251,14281,14321,14341,14401,14411,14431,14461,14551,14561,14591,14621,14731,14741,14771,14821,14831,14851,14891,14951,15031,15061,15091,15101,15121,15131,15161,15241,15271,15331,15361,15391,15401,15451,15461,15511,15541,15551,15581,15601,15641,15661,15671,15731,15761,15791,15881,15901,15971,15991,16001,16061,16091,16111,16141,16231,16301,16361,16381,16411,16421,16451,16481,16561,16631,16651,16661,16691,16741,16811,16831,16871,16901,16921,16931,16981,17011,17021,17041,17191,17231,17291,17321,17341,17351,17401,17431,17471,17491,17551,17581,17681,17761,17791,17851,17881,17891,17911,17921,17971,17981,18041,18061,18121,18131,18181,18191,18211,18251,18301,18311,18341,18371,18401,18451,18461,18481,18521,18541,18661,18671,18691,18701,18731,18911,19001,19031,19051,19081,19121,19141,19181,19211,19231,19301,19381,19391,19421,19441,19471,19501,19531,19541,19571,19661,19681,19751,19801,19841,19861,19891,19961,19991,20011,20021,20051,20071,20101,20161,20201,20231,20261,20341,20411,20431,20441,20521,20551,20611,20641,20681,20731,20771,20921,20981,21001,21011,21031,21061,21101,21121,21191,21211,21221,21341,21391,21401,21481,21491,21521,21601,21611,21661,21701,21751,21821,21841,21851,21871,21881,21911,21961,21991,22031,22051,22091,22111,22171,22271,22291,22381,22391,22441,22481,22501,22511,22531,22541,22571,22621,22651,22691,22721,22741,22751,22811,22861,22871,22901,22921,22961,23011,23021,23041,23071,23081,23131,23201,23251,23291,23311,23321,23371,23431,23531,23561,23581,23671,23741,23761,23801,23831,23911,23971,23981,24001,24061,24071,24091,24121,24151,24181,24251,24281,24371,24391,24421,24481,24551,24571,24611,24631,24671,24691,24781,24821,24841,24851,24971,25031,25111,25121,25171,25261,25301,25321,25391,25411,25471,25541,25561,25601,25621,25741,25771,25801,25841,25931,25951,25981,26021,26041,26111,26141,26161,26171,26251,26261,26321,26371,26431,26501,26561,26591,26641,26681,26701,26711,26731,26801,26821,26861,26881,26891,26921,26951,26981,27011,27031,27061,27091,27191,27211,27241,27271,27281,27361,27431,27481,27541,27551,27581,27611,27631,27691,27701,27751,27791,27851,27901,27941,27961,28001,28031,28051,28081,28111,28151,28181,28201,28211,28351,28411,28541,28571,28591,28621,28631,28661,28711,28751,28771,28871,28901,28921,28961,29021,29101,29131,29191,29201,29221,29231,29251,29311,29401,29411,29501,29531,29581,29611,29641,29671,29741,29761,29851,29881,29921,30011,30071,30091,30161,30181,30211,30241,30271,30341,30391,30431,30491,30631,30661,30671,30781,30841,30851,30871,30881,30911,30931,30941,30971,31051,31081,31091,31121,31151,31181,31231,31271,31321,31391,31481,31511,31531,31541,31601,31721,31741,31751,31771,31891,31981,31991,32051,32141,32191,32251,32261,32321,32341,32371,32381,32401,32411,32441,32491,32531,32561,32611,32621,32771,32801,32831,32911,32941,32971,33071,33091,33151,33161,33181,33191,33211,33301,33311,33331,33391,33461,33521,33581,33601,33641,33721,33751,33791,33811,33851,33871,33911,33931,33941,33961,34031,34061,34141,34171,34211,34231,34261,34301,34351,34361,34381,34421,34471,34501,34511,34591,34631,34651,34721,34781,34841,34871,34961,34981,35051,35081,35111,35141,35171,35201,35221,35251,35281,35291,35311,35381,35401,35461,35491,35521,35531,35591,35671,35731,35771,35801,35831,35851,35911,35951,36011,36061,36131,36151,36161,36191,36241,36251,36341,36451,36541,36551,36571,36671,36691,36721,36761,36781,36791,36821,36871,36901,36931,37021,37061,37171,37181,37201,37321,37361,37441,37501,37511,37561,37571,37591,37691,37781,37811,37831]
print(" ".join([str(x) for x in p[:int(input())]]))

Measured memory_bytes: 38384