#include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;

long long n, cnt[30];
string s;

int main() {
    cin >> n >> s;

    for(auto c : s)
        cnt[c-'a']++;

    long long ans = 0;

    for(int i = 0; i < 26; ++i)
        ans = (ans + ((ans * cnt[i])%MOD + cnt[i])%MOD)%MOD;

    cout << ans << endl;
}