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 PyPy3 (7.3.0) (judge verdict: Time Limit Exceeded)

k = int(input())
s = input()
L = len(s)
mod = 10**9+7

com = [1]*(k+1)
p25 = [1]*(k+1)
p26 = [1]*(k+1)

for i in range(k):
  com[i+1] = com[i]*(L+i)//(i+1)
  p25[i+1] = p25[i]*25%mod
  p26[i+1] = p26[i]*26%mod

ans = 0
for p in range(k+1):
  chk = p25[p]*com[p]%mod
  chk *= p26[k-p]%mod
  ans += chk
  ans %= mod
  
print(ans)