eval(input())

s = list(eval(input()))

d = {chr(i):1 for i in range(97, 123)}

for c in s:

    d[c] += 1

ans = 1

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

    ans *= i

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

s = eval(input())

ans = 1

for i in range(97, 123):

    ans *= s.count(chr(i)) + 1

print(((ans-1) % (10**9+7)))
eval(input())
s = list(eval(input()))
d = {chr(i): 1 for i in range(97, 123)}
for c in s:
    d[c] += 1
ans = 1
for i in list(d.values()):
    ans *= i
print(((ans - 1) % (10**9 + 7)))

eval(input())
s = eval(input())
ans = 1
for i in range(97, 123):
    ans *= s.count(chr(i)) + 1
print(((ans - 1) % (10**9 + 7)))

-s = list(eval(input())) -d = {chr(i): 1 for i in range(97, 123)} -for c in s: -    d[c] += 1 +s = eval(input()) -for i in list(d.values()): -    ans *= i +for i in range(97, 123): +    ans *= s.count(chr(i)) + 1