main=r!8!1>>=putStr.(>>=max", ".pure).show f!_=do x<-r;mapM(\_->f)[1..x] r=readLn