MOD = 10**9 + 7

N = gets.to_i
S = gets.chomp

char_cnt = {}
S.chars do |c|
  char_cnt[c] = 0 unless char_cnt.key?(c)
  char_cnt[c] += 1
end

ans = 0
(1..N).each do |n|
  char_cnt.keys.combination(n) do |chars|
    pat = 1
    chars.each do |c|
      pat = pat * (char_cnt[c] % MOD) % MOD
    end
    ans = (ans + pat) % MOD
  end
end
puts ans