n = int(eval(input()))

s = list(eval(input()))

mod = 10 ** 9 + 7

alpha = "abcdefghijklmnopqrstuvwxyz"

cnt = []

for a in alpha:

    tmp = s.count(a)

    cnt.append(tmp + 1)

ans = 1

for num in cnt:

    ans *= num

    ans %= mod

print((ans - 1))
MOD = 10 ** 9 + 7

cnt = [1 for _ in range(26)]

n = int(eval(input()))

string = eval(input())

for s in string:

    cnt[ord(s) - 97] += 1

ans = 1

for num in cnt:

    ans *= num

    ans %= MOD

print(((ans - 1) % MOD))
n = int(eval(input()))
s = list(eval(input()))
mod = 10**9 + 7
alpha = "abcdefghijklmnopqrstuvwxyz"
cnt = []
for a in alpha:
    tmp = s.count(a)
    cnt.append(tmp + 1)
ans = 1
for num in cnt:
    ans *= num
    ans %= mod
print((ans - 1))

MOD = 10**9 + 7
cnt = [1 for _ in range(26)]
n = int(eval(input()))
string = eval(input())
for s in string:
    cnt[ord(s) - 97] += 1
ans = 1
for num in cnt:
    ans *= num
    ans %= MOD
print(((ans - 1) % MOD))

+MOD = 10**9 + 7 +cnt = [1 for _ in range(26)] -s = list(eval(input())) -mod = 10**9 + 7 -alpha = "abcdefghijklmnopqrstuvwxyz" -cnt = [] -for a in alpha: -    tmp = s.count(a) -    cnt.append(tmp + 1) +string = eval(input()) +for s in string: +    cnt[ord(s) - 97] += 1 -    ans %= mod -print((ans - 1)) +    ans %= MOD +print(((ans - 1) % MOD))