Problem:
Score: 600 points

Problem Statement

How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"?

The answer can be enormous, so print it modulo (10^9+7).

Constraints

K is an integer between 1 and 10^6 (inclusive).

S is a string of length between 1 and 10^6 (inclusive) consisting of lowercase English letters.

Input

Input is given from Standard Input in the following format:

K
S

Output

Print the number of strings satisfying the condition, modulo (10^9+7).

Sample Input 1

5
oof

Sample Output 1

575111451

For example, we can obtain proofend, moonwolf, and onionpuf, while we cannot obtain oofsix, oofelevennn, voxafolt, or fooooooo.

Sample Input 2

37564
whydidyoudesertme

Sample Output 2

318008117

Solution in C++ (GCC 9.2.1) (judge verdict: Wrong Answer)

#include<bits/stdc++.h>
using namespace std;
const int _max = 2e6 + 10;
const int mod = 1e9 + 7;
typedef long long ll;

ll fac[_max], inv[_max];
int n;

void init(){
    fac[0] = 1;
    for(int i=1;i<=n;i++){
        fac[i]=(n-i+1)*fac[i-1]/i%mod;
    }
}

void jie(){
    ll he=1;
    for(int i=1;i<=n;i++){
        he=25*he%mod;
        inv[i]=he;
    }
}



int main()
{
    int k;string s;
    cin>>k>>s;
    n=k+s.size();
    ll ans=0;
    jie();
    init();
    for(int i=s.size();i<=n;i++){
        ans+=fac[i]*inv[n-i]%mod;
        ans=ans%mod;
    }
    cout<<ans+1;
    return 0;
}