a=1..9999 169.times{v=it?a[it]:2 j=0 a=a.grep{++j%v}} println a.join(' ')