n = gets.to_i
h = Hash.new(0)
gets.chomp.each_char { |c| h[c] += 1 }
ret = 0
mod = 10**9 + 7

1.upto(h.size) do |i|
  h.keys.combination(i) do |arr|
    ret += arr.map { |e| h[e] }.inject { |i, j| i * j % mod }
  end
end

puts ret % mod