a=(1..gets.to_i).select(&:odd?) i=0 1.upto(?z){|j|a-=[a[j*a[i]-j]]}while a[i+=1] puts a