from collections import Counter

n,s=int(eval(input())),eval(input());c=[s[i]for i in range(n)];a=Counter(c);ans=1

for i in a:ans*=a[i]+1

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

s=eval(input())

from collections import Counter

d=Counter(list(s))

ans=1

for i in d:ans*=d[i]+1

ans-=1

print((ans%(10**9+7)))
from collections import Counter

n, s = int(eval(input())), eval(input())
c = [s[i] for i in range(n)]
a = Counter(c)
ans = 1
for i in a:
    ans *= a[i] + 1
print(((ans - 1) % (10**9 + 7)))

n = int(eval(input()))
s = eval(input())
from collections import Counter

d = Counter(list(s))
ans = 1
for i in d:
    ans *= d[i] + 1
ans -= 1
print((ans % (10**9 + 7)))

+n = int(eval(input())) +s = eval(input()) -n, s = int(eval(input())), eval(input()) -c = [s[i] for i in range(n)] -a = Counter(c) +d = Counter(list(s)) -for i in a: -    ans *= a[i] + 1 -print(((ans - 1) % (10**9 + 7))) +for i in d: +    ans *= d[i] + 1 +ans -= 1 +print((ans % (10**9 + 7)))