import string



N = int(eval(input()))

s = eval(input())



MOD = 10 ** 9 + 7



d = dict()

for ss in s:

    d[ss] = d.get(ss, 0) + 1

ans = 1

for c in string.ascii_lowercase:

    ans *= (d.get(c, 0) + 1)

    ans %= MOD

ans -= 1

print(ans)

from collections import defaultdict



MOD = 10 ** 9 + 7



N = int(eval(input()))

s = eval(input())



d = defaultdict(int)

for ss in s:

    d[ss] += 1



ans = 1

for k, v in list(d.items()):

    ans *= (v + 1)

    ans %= MOD

    # v通りの選び方 + 選ばない1通り

ans -= 1

print(ans)

import string

N = int(eval(input()))
s = eval(input())
MOD = 10**9 + 7
d = dict()
for ss in s:
    d[ss] = d.get(ss, 0) + 1
ans = 1
for c in string.ascii_lowercase:
    ans *= d.get(c, 0) + 1
    ans %= MOD
ans -= 1
print(ans)

from collections import defaultdict

MOD = 10**9 + 7
N = int(eval(input()))
s = eval(input())
d = defaultdict(int)
for ss in s:
    d[ss] += 1
ans = 1
for k, v in list(d.items()):
    ans *= v + 1
    ans %= MOD
    # v通りの選び方 + 選ばない1通り
ans -= 1
print(ans)

-import string +from collections import defaultdict +MOD = 10**9 + 7 -MOD = 10**9 + 7 -d = dict() +d = defaultdict(int) -    d[ss] = d.get(ss, 0) + 1 +    d[ss] += 1 -for c in string.ascii_lowercase: -    ans *= d.get(c, 0) + 1 +for k, v in list(d.items()): +    ans *= v + 1 +    # v通りの選び方 + 選ばない1通り