l=[1..100] main=mapM print[last[x|x<-l,mod(2^x-2)x+mod n x<1]|n<-l]