main=f 0 f 256=f 0 f n=getLine>>=g where g"o"=print n>>f n;g"i"=f$n+1;g"d"=f$max(n-1)0;g"s"=f$n^2