main=mapM(putStrLn.f.show)[1..1000] f n=max[c|a<-n,elem a"369",c<-"Clap"]n