def cin; gets.split.map(&:to_i) end
def cout(*x); puts x.join(" ") end

exit if $0 != __FILE__

D = 10**9+7
n = gets.to_i
str = gets.chop
hs = {}
str.chars do |c|
  hs[c] = 0 if !hs[c]
  hs[c] += 1
end

ks = hs.keys
cnt = 0
[*(1..(hs.length))].each do |i|
  ks.combination(i) do |arr|
    c = 1
    arr.each do |x|
      c = (c * hs[x]) % D
    end
    cnt = (cnt + c) % D
  end
end

puts cnt