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-----
5
oof

-----Sample Output-----
575111451

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

Difficulty: interview

Starter code:

Solutions:
from functools import reduce
def comb(n, max_k, mod):
    """
    (n,k) := n個からk個選ぶ組み合わせ
    k = 0~max_Kまでを計算して返す
    """
    res = [1]*(max_k+1)
    t = 1
    for i in range(max_k+1):
        res[i] *= t
        t *= n-i
        t %= mod

    n = reduce(lambda x,y: (x*y)%mod, range(1,max_k+1), 1)
    n = pow(n,-1, mod)

    for i in reversed(range(max_k+1)):
        res[i] *= n
        res[i] %= mod
        n *= i
        n %= mod
    return res

MOD = 10**9+7

K = int(input())
N = len(input())

res = 0
x = 1

com = comb(N+K, K, MOD)

for c in com:
    res += x*c
    res %= MOD
    x *= 25
    x %= MOD

print(res)

k = int(input())
s = input()
s = len(s)

mod = 10 ** 9 + 7
n = k + s


def _fac_inv(_n, _mod):
    _fac = [1] * (_n + 1)
    _inv = [1] * (_n + 1)
    for i in range(_n):
        _fac[i + 1] = _fac[i] * (i + 1) % _mod
    _inv[_n] = pow(_fac[_n], _mod - 2, _mod)
    for i in range(_n, 0, -1):
        _inv[i - 1] = _inv[i] * i % _mod

    return _fac, _inv


fac, inv = _fac_inv(n, mod)

n25 = [1]
n26 = [1]
for _ in range(n-s):
    n25.append((n25[-1] * 25) % mod)
    n26.append((n26[-1] * 26) % mod)

ans = 0

for i in range(s, n + 1):
    ans = (ans + fac[i-1] * inv[s-1] * inv[i-s] * n25[i-s] * n26[n-i]) % mod

print(ans)


k = int(input())
s = input()
n = len(s)

MAX = 10**6
MOD = 10**9+7

inv = [0] * (MAX+1)
inv[1] = 1
for i in range(2, MAX+1):
    q, r = divmod(MOD, i)
    inv[i] = -inv[r] * q % MOD

ans = val = pow(26, k, MOD)
for i in range(1, k+1):
    val *= (i+n-1) * 25 * inv[i] * inv[26] % MOD
    val %= MOD
    ans += val
    ans %= MOD
print(ans)


Q = 10**9+7
def getInv(N):#Qはmod
    inv = [0] * (N + 1)
    inv[0] = 1
    inv[1] = 1
    for i in range(2, N + 1):
        inv[i] = (-(Q // i) * inv[Q%i]) % Q
    return inv

def main():
    K = int( input())
    S = input()
    N = len(S)
    ans = 0
    cmb = 1
    Inv = getInv(K+1)
    twenty_five = 1
    twenty_six = pow(26,K,Q)
    one_over_twenty_six = pow(26,Q-2,Q)
    for i in range(K+1):
        # ans += cmb*pow(25,i,Q)%Q*pow(26,K-i,Q)%Q
        # print(cmb, i, K-i)
        ans += cmb*twenty_five%Q*twenty_six%Q
        twenty_five *= 25
        twenty_five %= Q
        twenty_six *= one_over_twenty_six
        twenty_six %= Q
        ans %= Q
        cmb *= N+i
        cmb *= Inv[i+1]
        cmb %= Q
        
    print(ans)
def __starting_point():
    main()

__starting_point()

# F - Strivore
import sys
MOD = 10**9+7
K = int(input())
S = input()
l = len(S)
ans = 0

tmp = pow(26,K,MOD)
ans = tmp
waru = pow(26,-1,MOD)

for i in range(1,K+1):
    tmp = (tmp*25*waru)%MOD
    tmp = (tmp*(l-1+i)*pow(i,-1,MOD))%MOD
    ans = (ans+tmp)%MOD

print(ans)

def f_strivore(MOD=10**9 + 7):
    K = int(input())
    S = input()
    length = len(S)

    class Combination(object):
        """素数 mod に対する二項係数の計算"""
        __slots__ = ['mod', 'fact', 'factinv']

        def __init__(self, max_val_arg: int = 10**6, mod: int = 10**9 + 7):
            fac, inv = [1], []
            fac_append, inv_append = fac.append, inv.append

            for i in range(1, max_val_arg + 1):
                fac_append(fac[-1] * i % mod)

            inv_append(pow(fac[-1], -1, mod))
            for i in range(max_val_arg, 0, -1):
                inv_append((inv[-1] * i) % mod)

            self.mod, self.fact, self.factinv = mod, fac, inv[::-1]

        def combination(self, n, r):
            return (0 if n < 0 or r < 0 or n < r
                    else self.fact[n] * self.factinv[r] * self.factinv[n - r] % self.mod)

    comb = Combination(length + K).combination
    f = [1] * (K + 1)
    tmp = 1
    for n in range(K + 1):
        f[n] = (comb(length + n - 1, length - 1) * tmp) % MOD
        tmp = (tmp * 25) % MOD
    g = [1] * (K + 1)
    for n in range(1, K + 1):
        g[n] = (f[n] + 26 * g[n - 1]) % MOD
    return g[K]

print(f_strivore())

mod = 10**9 + 7
K = int(input())
S = input()
n = len(S)
tmp = pow(26, K, mod)
waru = pow(26, -1, mod)
ans = tmp
for i in range(1, K+1):
    tmp = (tmp * 25 * waru)%mod
    tmp = (tmp * (i + n -1) * pow(i, -1, mod))%mod
    ans = (ans+tmp)%mod
print(ans%mod)

n = int(input())
s = input()

S = len(s)
mod = 10 ** 9 + 7

tmp_ans = pow(26, n, mod)
div = pow(26, -1, mod)

ans = tmp_ans

for i in range(1, n+1):
    tmp_ans = (tmp_ans * 25 * div) % mod
    tmp_ans = ((tmp_ans * (S-1+i)) * pow(i, -1, mod)) % mod
    ans = (ans + tmp_ans) % mod

ans %= mod

print(ans)


n = int(input())
s = input()
 
S = len(s)
mod = 10 ** 9 + 7
 
tmp_ans = pow(26, n, mod)
div = pow(26, -1, mod)
 
ans = tmp_ans
 
for i in range(1, n+1):
    tmp_ans = (tmp_ans * 25 * div) % mod
    tmp_ans = ((tmp_ans * (S-1+i)) * pow(i, -1, mod)) % mod
    ans = (ans + tmp_ans) % mod
 
ans %= mod
 
print(ans)

n = int(input())
s = input()
 
S = len(s)
mod = 10 ** 9 + 7
 
tmp_ans = pow(26, n, mod)
div = pow(26, -1, mod)
 
ans = tmp_ans
 
for i in range(1, n+1):
    tmp_ans = (tmp_ans * 25 * div) % mod
    tmp_ans = ((tmp_ans * (S-1+i)) * pow(i, -1, mod)) % mod
    ans = (ans + tmp_ans) % mod
 
ans %= mod
 
print(ans)

K = int(input())
N = len(input()) + K
P = 10**9+7

nn = 2002002
fa = [1] * (nn+1)
fainv = [1] * (nn+1)
for i in range(nn):
    fa[i+1] = fa[i] * (i+1) % P
fainv[-1] = pow(fa[-1], P-2, P)
for i in range(nn)[::-1]:
    fainv[i] = fainv[i+1] * (i+1) % P

C = lambda a, b: fa[a] * fainv[b] % P * fainv[a-b] % P if 0 <= b <= a else 0

s = 0
po = 1
for i in range(K + 1):
    s = (s + C(N, i) * po) % P
    po = po * 25 % P
print(s)

import sys

K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip('\n')

# ## COMBINATION (MOD) ###
N_MAX = 10**6  # 問題サイズに合わせて変えておく
MOD = 10**9 + 7

inv = [0] * (N_MAX + 2)
inv[0] = 0  # 逆元テーブル計算用テーブル
inv[1] = 1

for i in range(2, N_MAX + 2):
    q, r = divmod(MOD, i)
    inv[i] = -inv[r] * q % MOD


# K 文字追加
ans = 0

ln = len(S)

p = pow(26, K, MOD)

for i in range(1, K + 2):

    ans += p % MOD
    ans %= MOD

    # pre
    p = p * (ln + i - 1) * inv[i] * 25 * inv[26] % MOD

    # suf
    # s2 = (s2 * inv[26]) % MOD

print(ans)


MOD = 10**9 + 7

class Combination:
    def __init__(self, size):
        self.size = size + 2

        f = 1
        self.fact = fact = [f]
        for i in range(1, size+1):
            f = f * i % MOD
            fact.append(f)
        f = pow(f, MOD-2, MOD)
        self.factInv = factInv = [f]
        for i in range(size, 0, -1):
            f = f * i % MOD
            factInv.append(f)
        factInv.reverse()

    def npr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * self.factInv[n - r] % MOD

    def ncr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % MOD) % MOD

    def nhr(self, n, r):  # 重複組合せ: x_1 + ... + x_n = r
        return self.ncr(n + r - 1, n - 1)

K = int(input())
S = input()
N = len(S)

comb = Combination(N + K + 100)

ans = 0
L = 1
R = pow(26, K, MOD)
inv26 = pow(26, MOD - 2, MOD)
for l in range(K + 1):
    ans += L * comb.nhr(N, l) * R
    ans %= MOD

    L = L * 25 % MOD
    R = R * inv26 % MOD

print(ans)


K = int(input())
S = input()

s = len(S)
mod = int(1e9+7)


n = pow(26, K, mod)
ans = n

for i in range(K):
    n = n*25*(s+i)*pow(26*(i+1),-1,mod)%mod
    ans = (ans +n) % mod


print(ans)

import sys

K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip('\n')

# ## COMBINATION (MOD) ###
N_MAX = 10**6  # 問題サイズに合わせて変えておく
MOD = 10**9 + 7

inv = [0, 1]  # 逆元テーブル計算用テーブル

for i in range(2, N_MAX + 2):
    inv.append((-inv[MOD % i] * (MOD // i)) % MOD)

# K 文字追加
ans = 0

ln = len(S)

p1 = 1
p2 = 1
s2 = pow(26, K, MOD)

for i in range(1, K + 2):

    ans += (p1 * p2 * s2) % MOD
    ans %= MOD

    # print(p1, p2, s2)

    # pre
    p1 = (p1 * (ln + i - 1) * inv[i]) % MOD
    p2 = (p2 * 25) % MOD

    # suf
    s2 = (s2 * inv[26]) % MOD

print(ans)


import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

MAX = 2 * 10**6 + 10
MOD = 10**9+7

fac = [1] * MAX
f_inv = [1] * MAX

def prepare(n, mod):
    for i in range(1, n+1):
        fac[i] = (fac[i-1] * i) % mod
    
    f_inv[n] = pow(fac[n], -1, MOD)
    for i in range(n-1, 0, -1):
        f_inv[i] = (f_inv[i+1] * (i+1)) % MOD

def modcmb(n, r, mod):
    if n < 0 or r < 0:
        return 0
    if r > n:
        return 0

    return fac[n] * f_inv[r] * f_inv[n-r] % mod


def main():
    K = int(readline())
    S = readline().strip()
    N = len(S)

    prepare(N + K + 5, MOD)

    inv26 = pow(26, -1, MOD)
    pow26 = pow(26, K, MOD)
    pow25 = 1
    ans = 0
    for i in range(K+1):
        ans += (modcmb(N-1+i, i, MOD) * pow25 * pow26) % MOD
        ans %= MOD

        pow25 *= 25
        pow25 %= MOD
        pow26 *= inv26
        pow26 %= MOD

    print(ans)


def __starting_point():
    main()

__starting_point()

#写経
#https://atcoder.jp/contests/abc171/submissions/14574647
from functools import reduce
def comb(n, max_k, mod):
    """
    (n,k) := n個からk個選ぶ組み合わせ
    k = 0~max_Kまでを計算して返す
    """
    res = [1]*(max_k+1)
    t = 1
    for i in range(max_k+1):
        res[i] *= t
        t *= n-i
        t %= mod

    n = reduce(lambda x,y: (x*y)%mod, range(1,max_k+1), 1)
    n = pow(n,-1, mod)

    for i in reversed(range(max_k+1)):
        res[i] *= n
        res[i] %= mod
        n *= i
        n %= mod
    return res

MOD = 10**9+7

def resolve():
    K = int(input())
    N = len(input())
    res = 0
    x = 1
    com = comb(N+K, K , MOD)

    for c in com:
        res += x*c
        res %= MOD
        x *= 25
        x %= MOD
    print(res)
resolve()

M = 10**9 + 7
k,n = int(input()),len(input())
a = t = pow(26,k,M)

for i in range(k):
    t = t*25*(i+n)*pow(26*(i+1),-1,M)%M
    a += t

print(a%M)

M=10**9+7
k,n=int(input()),len(input())
a=t=pow(26,k,M)
for i in range(1,k+1):
  t=t*25*(i+n-1)*pow(26*i,-1,M)%M
  a+=t
print(a%M)

import sys

K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip('\n')

# ## COMBINATION (MOD) ###
N_MAX = 10**6  # 問題サイズに合わせて変えておく
MOD = 10**9 + 7

inv = [0] * (N_MAX + 2)
inv[0] = 0  # 逆元テーブル計算用テーブル
inv[1] = 1

for i in range(2, N_MAX + 2):
    inv[i] = -inv[MOD % i] * (MOD // i) % MOD

# K 文字追加
ans = 0

ln = len(S)

p1 = 1
p2 = 1
s2 = pow(26, K, MOD)

for i in range(1, K + 2):

    ans += (p1 * p2 * s2) % MOD
    ans %= MOD

    # print(p1, p2, s2)

    # pre
    p1 = (p1 * (ln + i - 1) * inv[i]) % MOD
    p2 = (p2 * 25) % MOD

    # suf
    s2 = (s2 * inv[26]) % MOD

print(ans)


def calc_inv(n, mod_n):
    inv_li = [0] * (n + 2)
    inv_li[0] = 0
    inv_li[1] = 1
    for i in range(2, n + 2):
        q, r = divmod(mod_n, i)
        inv_li[i] = -inv_li[r] * q % mod_n
    return inv_li


K = int(input())
S = input()
s_len = len(S)

MOD = 10**9 + 7
inv = calc_inv(max(K, 26) + 10, MOD)

ans = 0
p = pow(26, K, MOD)

for i in range(1, K + 2):
    ans = (ans + p % MOD) % MOD
    p = p * (s_len + i - 1) * inv[i] * 25 * inv[26] % MOD

print(ans)


K = int(input())
S = input()

m = 1000000007

result = 0
t = pow(26, K, m)
u = pow(26, -1, m) * 25 % m
l = len(S)
for i in range(K + 1):
    # result += pow(26, K - i, m) * mcomb(len(S) - 1 + i, i) * pow(25, i, m)
    result = (result + t) % m
    t = (t * u) % m * (l + i) % m * pow(i + 1, -1, m) % m
print(result)


K = int(input())
S = input()
N = len(S)
mod = int(1e9+7)

### 123
### a1bb2ccc3dddd 10文字インサート
# pow(25,6) * pow(26,4) * 8C2
# (3はfixで、それより前の8mojiから1/2を入れる場所を決める）
# これを3の位置でループする（1-indexで 3<=i<=N)

# 123dddddddddd
# pow(25,0) * pow(26,10) * 2C2(1)
# 12x3ddddddddd
# pow(25,1) * pow(26,9) * 3C2( = 2C2 * 3 / 1)
# 12xx3dddddddd
# pow(25,2) * pow(26,8) * 4C2( = 3C2 * 4 / 2)
# ...
# 12xxxxxxxxxx3
# pow(25,10) * pow(26,0) * 12C2( = 11C2 * 12 / 10)

# 5C5, 6C5, 7C5 1, 6, 21, 56

wk = pow(26,K,mod)
inv26 = pow(26,-1,mod)

ans = wk
for i in range(1,K+1):
  wk = (wk * 25 * inv26) % mod
  wk = (wk * (N-1+i) * pow(i,-1,mod) % mod)
  ans = (ans + wk)%mod
    
print(ans)


# フェルマーの小定理
def main():
    from builtins import pow

    K = int(input())
    S = input()

    m = 1000000007

    result = 0
    t = pow(26, K, m)
    u = pow(26, -1, m) * 25 % m
    l = len(S)
    for i in range(K + 1):
        # result += pow(26, K - i, m) * mcomb(len(S) - 1 + i, i) * pow(25, i, m)
        result = (result + t) % m
        t = (t * u) % m * (l + i) * pow(i + 1, -1, m) % m
    print(result)


main()


# F - Strivore
import sys
MOD = 10**9+7
K = int(input())
S = input()
l = len(S)
ans = 0
 
tmp = pow(26,K,MOD)
ans = tmp
waru = pow(26,-1,MOD)
 
for i in range(1,K+1):
    tmp = (tmp*25*waru)%MOD
    tmp = (tmp*(l-1+i)*pow(i,-1,MOD))%MOD
    ans = (ans+tmp)%MOD
 
print(ans)

k = int(input())
s = input()
n = len(s)

MOD = 10**9+7
d = pow(26, -1, MOD)
ans = val = pow(26, k, MOD)
for i in range(1, k+1):
    val *= (i+n-1) * 25 * pow(i, -1, MOD) * d % MOD
    val %= MOD
    ans += val
    ans %= MOD
print(ans)

K = int(input())
S = input()

m = 1000000007

result = 0
t = pow(26, K, m)
u = pow(26, -1, m) * 25 % m
l = len(S)
for i in range(K + 1):
    # result += pow(26, K - i, m) * mcomb(len(S) - 1 + i, i) * pow(25, i, m)
    result = (result + t) % m
    t = (t * u) % m * (l + i) * pow(i + 1, -1, m) % m
print(result)


def solve(k, length, MOD, div, dp):
    for i in range(1, k + 1):
        dp[0] = dp[0] * 25 * div * (length + i - 1) * pow(i, -1, MOD) % MOD
        dp[1] = (dp[1] + dp[0]) % MOD

    return(dp[1])


k = int(input())
s = input()
length = len(s)
MOD = 10**9 + 7
div = pow(26, -1, MOD)

dp = [pow(26, k, MOD)] * 2

print(solve(k, length, MOD, div, dp))

MOD = 10**9 + 7

class Combination:
    def __init__(self, size, MOD):
        self.size = size + 2

        f = 1
        self.fact = fact = [f]
        for i in range(1, size+1):
            f = f * i % MOD
            fact.append(f)
        f = pow(f, MOD-2, MOD)
        self.factInv = factInv = [f]
        for i in range(size, 0, -1):
            f = f * i % MOD
            factInv.append(f)
        factInv.reverse()

    def npr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * self.factInv[n - r] % MOD

    def ncr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % MOD) % MOD

    def nhr(self, n, r):  # 重複組合せ: x_1 + ... + x_n = r
        return self.ncr(n + r - 1, n - 1)

def sol():
    K = int(input())
    S = input()
    N = len(S)

    comb = Combination(N + K + 100, MOD)

    ans = 0
    L = 1
    R = pow(26, K, MOD)
    inv26 = pow(26, MOD - 2, MOD)
    for l in range(K + 1):
        ans += L * comb.nhr(N, l) * R
        ans %= MOD

        L = L * 25 % MOD
        R = R * inv26 % MOD

    print(ans)
sol()

K = int(input())
S = input()
N = len(S)
mod = int(1e9+7)


wk = pow(26,K,mod)
inv26 = pow(26,-1,mod)

ans = wk
for i in range(1,K+1):
  wk = (wk * 25 * inv26) % mod
  wk = (wk * (N-1+i) * pow(i,-1,mod) % mod)
  ans = (ans + wk)%mod
    
print(ans)


import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

n_ = 2 * 10**6 + 5
mod = 10**9 + 7
fun = [1] * (n_ + 1)
for i in range(1, n_ + 1):
    fun[i] = fun[i - 1] * i % mod
rev = [1] * (n_ + 1)
rev[n_] = pow(fun[n_], mod - 2, mod)
for i in range(n_ - 1, 0, -1):
    rev[i] = rev[i + 1] * (i + 1) % mod

def nCr(n, r):
    if r > n:
        return 0
    return fun[n] * rev[r] % mod * rev[n - r] % mod

def modinv(x, mod):
    a, b = x, mod
    u, v = 1, 0
    while b:
        t = a // b
        a -= t * b; a, b = b, a
        u -= t * v; u, v = v, u
    return u % mod


inv26 = modinv(26, mod)


def solve():
    k = ni()
    s = ns()
    n = len(s)
    ans = 0
    v = 1
    u = pow(26, k, mod)
    for i in range(n, n+k+1):
        ans = (ans + nCr(i-1, n-1) * v * u) % mod
        u = u * inv26 % mod
        v = v * 25 % mod
    print(ans)
    return

solve()


def main():
    K = int(input())
    S = input()
    N = len(S)
    mod = 10**9 + 7
    r = 0
    t = pow(26, K, mod)
    s = 1
    inv26 = pow(26, mod - 2, mod)
    inv = [0] * (K + 2)
    inv[1] = 1
    for i in range(2, K + 2):
        inv[i] = -inv[mod % i] * (mod // i) % mod
    for i in range(K + 1):
        r = (r + t * s) % mod
        t = (t * 25 * inv26) % mod
        s = (s * (N + i) * inv[i + 1]) % mod
    return r

        
print((main()))


k = int(input())
s = input()
len_s = len(s)
MOD = 1000000007

x_i = pow(26, k, MOD)
r = (25 * pow(26, -1, MOD)) % MOD
comb_i = 1

a = 0
for i in range(k + 1):  
  a += (comb_i  * x_i  ) % MOD
  a %= MOD
  
  x_i  = (x_i  * r) % MOD
  comb_i = (comb_i * (len_s + i) * pow(i + 1, -1, MOD)) % MOD


print(a)

K = int(input())
N = len(input())

mod = 10 ** 9 + 7
div = pow(26, -1, mod)
comb_i = pow(26, K, mod)
ans = comb_i
for i in range(1, K + 1):
  comb_i = (comb_i * (N - 1 + i) * pow(i, -1, mod)) % mod
  comb_i = (comb_i * 25 * div) % mod
  ans = (ans + comb_i) % mod
  
print(ans)

from functools import reduce
def comb(n, max_k, mod):
    """
    (n,k) := n個からk個選ぶ組み合わせ
    k = 0~max_Kまでを計算して返す
    """
    res = [1]*(max_k+1)
    t = 1
    for i in range(max_k+1):
        res[i] *= t
        t *= n-i
        t %= mod

    n = reduce(lambda x,y: (x*y)%mod, range(1,max_k+1), 1)
    n = pow(n,-1, mod)

    for i in reversed(range(max_k+1)):
        res[i] *= n
        res[i] %= mod
        n *= i
        n %= mod
    return res

MOD = 10**9+7

def resolve():
    K = int(input())
    N = len(input())
    res = 0
    x = 1
    com = comb(N+K, K , MOD)

    for c in com:
        res += x*c
        res %= MOD
        x *= 25
        x %= MOD
    print(res)
resolve()

M=10**9+7
k,n=int(input()),len(input())
a=t=pow(26,k,M)
for i in range(k):
  t=t*25*(i+n)*pow(26*-~i,-1,M)%M
  a+=t
print(a%M)