import operator

import functools

N = int(eval(input()))

S = eval(input())

c = [1] * 26

for s in S:

    c[ord(s)-ord('a')] += 1

print(((functools.reduce(operator.mul,c)-1) % (10**9+7)))



eval(input())

S=eval(input())

s=set(S)

a=1

for c in s:a=a*(S.count(c)+1)%(10**9+7)

print((a-1))

import operator
import functools

N = int(eval(input()))
S = eval(input())
c = [1] * 26
for s in S:
    c[ord(s) - ord("a")] += 1
print(((functools.reduce(operator.mul, c) - 1) % (10**9 + 7)))

eval(input())
S = eval(input())
s = set(S)
a = 1
for c in s:
    a = a * (S.count(c) + 1) % (10**9 + 7)
print((a - 1))

-import operator -import functools - -N = int(eval(input())) +eval(input()) -c = [1] * 26 -for s in S: -    c[ord(s) - ord("a")] += 1 -print(((functools.reduce(operator.mul, c) - 1) % (10**9 + 7))) +s = set(S) +a = 1 +for c in s: +    a = a * (S.count(c) + 1) % (10**9 + 7) +print((a - 1))