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: Accepted)

#define _USE_MATH_DEFIMES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

const int MOD = 1'000'000'007;
const int INF = 1'000'000'000; //1e9
const int NIL = -1;
const long long LINF = 1'000'000'000'000'000'000; // 1e18
const long double EPS = 1E-10;

template<class T, class S> inline bool chmax(T &a, const S &b){
    if(a < b){
        a = b; return true;
    }
    return false;
}
template<class T, class S> inline bool chmin(T &a, const S &b){
    if(b < a){
        a = b; return true;
    }
    return false;
}






std::vector<long long> fact_inv, fact;

long long power(long long a, unsigned long long b, long long m){
    long long ret(1);
    while(b){
        if(b & 1) ret = (ret * a) % m;
        a = (a * a) % m;
        b /= 2;
        if(ret < 0) ret += m;
        if(a < 0) a += 0;
    }
    return ret;
}

long long power(long long a, unsigned long long b) {
    return power(a, b, MOD);
}

long long inv(long long a, long long m){ // GCD(a, m) = 1
    return power(a, m-2, m);
}

long long inv(long long a){
    return inv(a, MOD);
}

long long comb(long long a, long long b, long long m){
    if(a < b) return 0;
    if(a < 0 || b < 0) return 0;
    long long ret = fact[a];
    ret = ret * fact_inv[b] % m;
    ret = ret * fact_inv[a-b] % m;
    return ret;
}

long long comb(long long a, long long b){
    return comb(a, b, MOD);
}

void precom(int n, long long m){
    fact.resize(n);
    fact_inv.resize(n);
    fact[0] = fact[1] = 1;
    fact_inv[0] = fact_inv[1] = 1;
    for(int i = 2; i < n; ++i) fact[i] = fact[i-1] * i % m;
    for(int i = 2; i < n; ++i) fact_inv[i] = inv(fact[i], m);
    return;
}

void precom(int n){
    precom(n, MOD);
    return;
}


int main(){
    int K; std::cin >> K;
    std::string S; std::cin >> S;
    int N(S.length());
    long long ans(0);
    precom(K+N+4);
    for(int i(0); i <= K; ++i){
        long long c(power(25, K-i) * power(26, i) % MOD);
        ans += c * comb(K-i+N-1, N-1) % MOD;
        ans %= MOD;
    }
    std::cout << ans << std::endl;
    return 0;
}