N=gets.to_i
S=gets.chomp.chars
list=[*'a'..'z'].map{|x|S.count(x)}.select{|x|x>0}
sm=0
sz=list.size
1.upto(2**sz-1){|i|
    t=1
    #if list[i[0]]==0 then continue end 
    for x in 0...sz do
        if i[x]==1 then
            t*=list[x]
            if t==0 then break end
        end
    end
    sm=(sm+t)%1000000007
}
p sm