n = int(eval(input()))

s = eval(input())

from collections import Counter

ans = 1

x = Counter(s)

for i in list(x.values()):

    ans *= (i+1)

ans %= 10**9+7

print((ans%(10**9+7)-1))
n = int(eval(input()))

s = eval(input())

a = list('abcdefghijklmnopqrstuvwxyz')

cnt = [0]*26

for i,a_ in enumerate(a):

    cnt[i] += s.count(a_)+1

ans = 1

for cnt_ in cnt:

    ans *= cnt_

print((ans%(10**9+7)-1))
n = int(eval(input()))
s = eval(input())
from collections import Counter

ans = 1
x = Counter(s)
for i in list(x.values()):
    ans *= i + 1
ans %= 10**9 + 7
print((ans % (10**9 + 7) - 1))

n = int(eval(input()))
s = eval(input())
a = list("abcdefghijklmnopqrstuvwxyz")
cnt = [0] * 26
for i, a_ in enumerate(a):
    cnt[i] += s.count(a_) + 1
ans = 1
for cnt_ in cnt:
    ans *= cnt_
print((ans % (10**9 + 7) - 1))

-from collections import Counter - +a = list("abcdefghijklmnopqrstuvwxyz") +cnt = [0] * 26 +for i, a_ in enumerate(a): +    cnt[i] += s.count(a_) + 1 -x = Counter(s) -for i in list(x.values()): -    ans *= i + 1 -ans %= 10**9 + 7 +for cnt_ in cnt: +    ans *= cnt_