# A - Colorful Subsequence

from collections import defaultdict as dd

n=int(eval(input()))

s=eval(input())

mod=10**9+7

ans=1

c=dd(int)



for ss in s:

    c[ord(ss)-97]+=1



for i in range(26):

    ans*=c[i]+1

    ans%=mod



print(((ans+mod-1)%mod))

from collections import defaultdict as dd

n=int(eval(input()))

s=eval(input())

mod=10**9+7



d=dd(int)

for ss in s:

    d[ss]+=1



ans=1

for v in list(d.values()):

    ans*=(v+1)

    ans%=mod

print(((ans+mod-1)%mod))



# A - Colorful Subsequence
from collections import defaultdict as dd

n = int(eval(input()))
s = eval(input())
mod = 10**9 + 7
ans = 1
c = dd(int)
for ss in s:
    c[ord(ss) - 97] += 1
for i in range(26):
    ans *= c[i] + 1
    ans %= mod
print(((ans + mod - 1) % mod))

from collections import defaultdict as dd

n = int(eval(input()))
s = eval(input())
mod = 10**9 + 7
d = dd(int)
for ss in s:
    d[ss] += 1
ans = 1
for v in list(d.values()):
    ans *= v + 1
    ans %= mod
print(((ans + mod - 1) % mod))

-# A - Colorful Subsequence +d = dd(int) +for ss in s: +    d[ss] += 1 -c = dd(int) -for ss in s: -    c[ord(ss) - 97] += 1 -for i in range(26): -    ans *= c[i] + 1 +for v in list(d.values()): +    ans *= v + 1