mod = 10**9 + 7

N = int(eval(input()))

S = list(eval(input()))

al = [chr(ord("a") + i ) for i in range(26)]

cntAl = [ S.count(chr(ord("a") + i )) for i in range(26)]

ans = 1

for a in cntAl:

    if a != 0:ans *= (a+1)%mod

print(((ans-1)%mod))
n = int(eval(input()))

s = eval(input())

mod = 10**9 + 7

car = [0] * 26



for i in range(n):

	car[ord(s[i])-97] += 1



ans = 1

for i in range(26):

	if car[i] == 0:

		continue

	else:

		ans *= (car[i]+1)

		ans %= mod



print((ans - 1))
mod = 10**9 + 7
N = int(eval(input()))
S = list(eval(input()))
al = [chr(ord("a") + i) for i in range(26)]
cntAl = [S.count(chr(ord("a") + i)) for i in range(26)]
ans = 1
for a in cntAl:
    if a != 0:
        ans *= (a + 1) % mod
print(((ans - 1) % mod))

n = int(eval(input()))
s = eval(input())
mod = 10**9 + 7
car = [0] * 26
for i in range(n):
    car[ord(s[i]) - 97] += 1
ans = 1
for i in range(26):
    if car[i] == 0:
        continue
    else:
        ans *= car[i] + 1
        ans %= mod
print((ans - 1))

+n = int(eval(input())) +s = eval(input()) -N = int(eval(input())) -S = list(eval(input())) -al = [chr(ord("a") + i) for i in range(26)] -cntAl = [S.count(chr(ord("a") + i)) for i in range(26)] +car = [0] * 26 +for i in range(n): +    car[ord(s[i]) - 97] += 1 -for a in cntAl: -    if a != 0: -        ans *= (a + 1) % mod -print(((ans - 1) % mod)) +for i in range(26): +    if car[i] == 0: +        continue +    else: +        ans *= car[i] + 1 +        ans %= mod +print((ans - 1))