Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
import Data.Char
f i=filter(>0)[length.filterx=[r|(==nv,u)$toLower<$>i|n<<-['a'zip['a'..'z']]>>=show'z']['A'..],r<-[sum[1|k<-x,v==k||u==k]],r>0]>>=show
import Data.Char
c l n=length$filter(==n)l
g []=""
gfi=filter(i:r>0)|i==0=g r|1>0=show i++g r
f i=g$map[length.filter(c$map toLower i==n)$toLower<$>i|n<-['a'..'z']'z']]>>=show