import collections

from functools import reduce

N=int(eval(input()))

S=eval(input())

c=collections.Counter(S)

d=[x+1 for x in list(c.values())]

print(((reduce(lambda x,y:x*y,d)-1)%1000000007))
N=int(eval(input()))

S=eval(input())

C=set(S)

m=1

for c in C:

  m*=S.count(c)+1

print(((m-1)%(10**9+7)))
import collections
from functools import reduce

N = int(eval(input()))
S = eval(input())
c = collections.Counter(S)
d = [x + 1 for x in list(c.values())]
print(((reduce(lambda x, y: x * y, d) - 1) % 1000000007))

N = int(eval(input()))
S = eval(input())
C = set(S)
m = 1
for c in C:
    m *= S.count(c) + 1
print(((m - 1) % (10**9 + 7)))

-import collections -from functools import reduce - -c = collections.Counter(S) -d = [x + 1 for x in list(c.values())] -print(((reduce(lambda x, y: x * y, d) - 1) % 1000000007)) +C = set(S) +m = 1 +for c in C: +    m *= S.count(c) + 1 +print(((m - 1) % (10**9 + 7)))