Buggy python submission (verdict: Runtime Error):
use std::io::stdin;
use std::collections::HashMap;

fn main() {
    let mut st = String::new();
    stdin().read_line(&mut st).unwrap();
    let n = st.trim().parse::<usize>().unwrap();
    let mut st = String::new();
    stdin().read_line(&mut st).unwrap();
    let s:Vec<char> = st.trim().chars().collect();
    let mut map:HashMap<&char, i64> = HashMap::new();
    for i in &s {
        let count = map.entry(i).or_insert(1);
        *count += 1;
    };
    let mo = 100000007;
    let mut result:i64 = 1;
    for (_i, j) in map.iter() {
        result = (result*j)%mo;
    };
    println!("{}", result-1);
}


fn bisec(v:&Vec<i64>, num:&i64) -> usize {
    let mut l:usize = 0;
    let mut r = v.len() as usize;
    let mut m = (l+r)/2 as usize;
    while l < r {
        if num <= &v[m] {
            r = m;
        } else {
            l = m+1;
        };
        m = (l+r)/2;
    };
    l
}

fn max (a:&i64, b:&i64) -> i64 {
    if a < b {
        *b
    } else {
        *a
    }
}

fn min (a:&i64, b:&i64) -> i64 {
    if a > b {
        *b
    } else {
        *a
    }
}

Fixed submission:
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 1
for i, j in d.items():
    result = (result*(j+1))%mod

print((result-1)%mod)

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 0
for i in range(1, 2**len(d)):
    c = 1
    num = i
    for n, j in d.items():
        if num%2==1:
            c = (c*j)%mod
        num >>= 1
    result = (result+c)%mod

print(result%mod)

Fixed submission:
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 1
for i, j in d.items():
    result = (result*(j+1))%mod

print((result-1)%mod)

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 0
for i in range(1, 2**len(d)):
    c = 1
    num = i
    for n, j in d.items():
        if num%2==1:
            c = (c*j)%mod
        num >>= 1
    result = (result+c)%mod

print(result%mod)

Fixed submission:
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 1
for i, j in d.items():
    result = (result*(j+1))%mod

print((result-1)%mod)

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in list(s):
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 0
for i in range(1, 2**len(d)):
    c = 1
    num = i
    for n, j in d.items():
        if num%2==1:
            c = (c*j)%mod
        num >>= 1
    result = (result+c)%mod

print(result%mod)

Fixed submission:
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 1
for i, j in d.items():
    result = (result*(j+1))%mod

print((result-1)%mod)

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in list(s):
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 0
for i in range(1, 2**len(d)):
    c = 1
    num = i
    for n, j in d.items():
        if num%2==1:
            c *= j
            c %= mod
        num >>= 1
    result += c
    result %= mod

print(result%mod)

Fixed submission:
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 1
for i, j in d.items():
    result = (result*(j+1))%mod

print((result-1)%mod)

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in list(s):
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
dic = [j for i, j in d.items()]
result = 0
for i in range(1, 2**len(dic)):
    c = 1
    num = i
    for j in dic:
        if num%2==1:
            c *= j
            c %= mod
        num >>= 1
    result += c
    result %= mod

print(result%mod)

Fixed submission:
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 1
for i, j in d.items():
    result = (result*(j+1))%mod

print((result-1)%mod)

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in list(s):
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
dic = [j for i, j in d.items()]
result = 0
for i in range(1, 2**len(dic)):
    c = 1
    n = []
    num = i
    for j in dic:
        if num%2==1:
            c *= j
            c %= mod
            n.append(j)
        else:
            n.append(0)
        num >>= 1
    result += c
    result %= mod

print(result%mod)

Fixed submission:
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 1
for i, j in d.items():
    result = (result*(j+1))%mod

print((result-1)%mod)

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n = int(input())
s = input()
dic = [0 for _ in range(26)]
for i in range(n):
    dic[ord(s[i])-97] += 1
dic = [i for i in dic if i > 0]
result = 0
for i in range(1, 2**len(dic)):
    c = 1
    n = []
    num = i
    for j in dic:
        if num%2==1:
            c *= j
            c %= mod
            n.append(j)
        else:
            n.append(0)
        num >>= 1
    result += c
    result %= mod

print(result%mod)

Fixed submission:
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 1
for i, j in d.items():
    result = (result*(j+1))%mod

print((result-1)%mod)

Buggy python submission (verdict: Time Limit Exceeded):
mod = 10**9+7
n = int(input())
s = input()
dic = [0 for _ in range(26)]
for i in range(n):
    dic[ord(s[i])-97] += 1
dic = [i for i in dic if i > 0]
result = 0
for i in range(1, 2**len(dic)):
    c = 1
    n = []
    num = i
    for j in dic:
        if num%2==1:
            c *= j
            c %= mod
            n.append(j)
        else:
            n.append(0)
        num >>= 1
    result += c
    result %= mod

print(result%mod)

Fixed submission:
mod = 10**9+7
n = int(input())
s = input()
d = {}
for i in s:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
result = 1
for i, j in d.items():
    result = (result*(j+1))%mod

print((result-1)%mod)