#define _CRT_SECURE_NO_WARNINGS
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define rep(i,n) for(int i=0;i<(lint)(n);i++)
#define REP(i,n) for(int i=1;i<=(lint)(n);i++)
#define all(V) V.begin(),V.end()
#define stackReplaceBegin(size)\
	void* p=malloc(size);\
	esp_new=(lint)p+size-1;\
	void * stack_extend_memory_ = malloc(size);\
	void * stack_extend_origin_memory_;\
	char * stack_extend_dummy_memory_ = (char*)alloca((1+(int)(((long long)stack_extend_memory_)&127))*16);\
	*stack_extend_dummy_memory_ = 0;\
	asm volatile("mov %%rsp, %%rbx\nmov %%rax, %%rsp":"=b"(stack_extend_origin_memory_):"a"((char*)stack_extend_memory_+(size)-1024));
typedef long long lint;
typedef unsigned long long ulint;
typedef std::pair<lint, lint> P;
constexpr int INF = INT_MAX/2;
constexpr lint LINF = LLONG_MAX/2;
constexpr double eps = DBL_EPSILON;
constexpr double PI=3.141592653589793238462643383279;
lint esp_new;
template<class T>
class prique :public std::priority_queue<T, std::vector<T>, std::greater<T>> {};
template <class T, class U>
inline bool chmax(T& lhs, const U& rhs) {
	if (lhs < rhs) {
		lhs = rhs;
		return 1;
	}
	return 0;
}
template <class T, class U>
inline bool chmin(T& lhs, const U& rhs) {
	if (lhs > rhs) {
		lhs = rhs;
		return 1;
	}
	return 0;
}
inline lint gcd(lint a, lint b) {
	while (b) {
		lint c = a;
		a = b; b = c % b;
	}
	return a;
}
inline lint lcm(lint a, lint b) {
	return a / gcd(a, b) * b;
}
bool isprime(lint n) {
	if (n == 1)return false;
	for (int i = 2; i * i <= n; i++) {
		if (n % i == 0)return false;
	}
	return true;
}
template<typename T>
T mypow(T a, unsigned int b) {
	T res(1),now(a);
	while(b){
		if(b&1)res*=now;
		b>>=1;
		now*=now;
	}
	return res;
}
template<typename T>
void printArray(std::vector<T>& vec) {
	rep(i, vec.size() - 1)std::cout << vec[i] << " ";
	std::cout << vec.back() << std::endl;
}
template<typename T>
void printArray(T l, T r) {
	T rprev = r;
	rprev--;
	for (T i = l; i != rprev; i++) {
		std::cout << *i << " ";
	}
	std::cout << *rprev << std::endl;
}
lint modpow(lint a,lint b,int m){
	lint res(1),now(a);
	while(b){
		if(b&1){
			res*=now;
			res%=m;
		}
		b>>=1;
		now*=now;
		now%=m;
	}
	return res;
}
constexpr int mod=1000000007;
int k,n=-1,cnt=13;
char c[15];
lint fact[2000010],inv[2000010];
lint fact26[1001]={1,973511947,317652281,380633091,918182171,733867795,950043445,402386956,240863790,523312705,768228473,255909794,69390238,225307811,225539109,590280118,927056552,599122390,297423730,449483446,596686855,894184246,206693682,387887485,95991609,519109884,342266458,587970345,332438658,942216112,267079619,76671807,590091796,211456949,686678655,712962202,547886782,146764286,813787354,890896303,437544625,801450463,197630296,898378148,879661185,915152533,966428332,535475764,933908165,664152012,780167973,65753572,451841475,983490335,179455157,67348513,559232744,626654297,497998179,447094302,385864507,858259201,947495294,978491551,269047341,938637341,967390321,313302791,931916028,508166856,922483125,807056023,789056063,806196175,494311511,129594811,894572352,31751282,143194290,81373173,526273546,834719002,146654489,123290811,623643485,66344642,154326867,715906720,978977667,999362520,793787025,801759653,354416226,806453033,824243659,658616772,548376047,466179106,955962907,338860801,834294302,625657746,200494460,751027370,101050606,503972085,267639601,239960718,148465578,889529282,171560415,465665221,772580723,597581775,199694974,584016291,551300753,678711036,481614013,216114367,720113137,153876580,944896451,287324258,867915161,301448063,676265645,144692055,192464984,991595135,752269924,256375757,613574859,434083316,161279215,506230918,164024445,689786130,729289879,62877578,952939862,935642983,701200596,671130348,198793707,398221200,34964749,637086103,196696045,394747979,920562023,71741934,360994095,818928538,901586523,250753566,545071872,651216959,237736778,4209622,280667215,21087410,422585355,839992969,993298355,759032529,970633360,502289765,660426874,458329549,491296887,670425294,711318222,388460760,153501404,629225445,775982034,468365773,389672327,94336028,647665773,264917490,678950657,386233182,372807056,401373192,882333666,78571189,646065053,232023890,323267641,389072671,818332207,552783811,349698537,234871632,162835138,124740029,650575114,466488471,477338365,836084476,389667232,51000783,209305404,939332425,540822158,329843830,901488668,239846722,681332205,800357883,522022516,371632588,780007509,445783662,696579895,75603650,996599165,706315953,788941400,6598689,531070169,597786993,373035946,549362233,312422800,186160318,361714102,230445615,765871506,738786797,130839383,596992794,163652627,427210267,894299784,829238829,296872756,681751728,450040287,958971645,706750393,316235549,862590329,769966675,657363968,895663999,420718874,300363749,50355431,331682866,405919492,215998620,633572495,855565049,806820873,456321460,872841897,623589403,593595538,883786085,317223353,851153244,961551153,544554195,910557595,959016635,8939330,492257702,545234544,785550802,369229899,349955348,809742593,762199997,888788580,930441202,787470961,82784386,231918426,860007930,509143794,730303984,388979312,717108436,853689524,825204620,666169290,999841331,19379139,207012872,664075270,526854262,794575716,907376430,847816694,697525500,833802686,579671552,257811505,434672189,58032021,356590832,712651880,375584562,656309829,992548885,765221765,117258780,421574906,673544554,565860983,435556940,720623013,527890562,218189859,963872449,917258844,874672216,24437630,594833342,857395354,578501940,10427358,517587927,30317680,478720599,139214720,169569496,47223209,815371424,949985816,882786014,257690183,19065011,848266312,189047783,16081583,67582810,486282366,602614779,688695939,773707200,407426021,185734215,3465273,641502143,865032456,563915864,863975426,237781671,875740372,644418328,782322064,374499518,366683282,293376183,116521782,68682132,579390879,741023847,16631168,627229616,413913712,838467684,833612641,502999014,30491436,19399453,128565798,452466333,707410712,747066846,697659704,30223324,786092466,740798495,153886505,50902785,986191119,651316890,259431447,314080032,325817677,882975333,564694148,630830691,923916914,518262529,132190643,341287738,981872077,694154589,726000323,18969000,993377171,76110178,52637397,479780021,105909834,982055389,114933854,200527385,631657974,802329325,848405536,415408159,836941959,328673243,479962839,611790655,536356736,694877190,427490243,873265136,843641540,426412596,651460141,818374952,320667035,396354836,396232537,859459804,303417721,257347369,496802291,199969843,837503118,315515751,915068747,295007952,721646203,209968876,853311123,933526519,726228009,58582057,970122662,901460956,276960304,901382754,696213927,857877879,427439907,176243958,498537047,879278140,34024204,849304412,934154269,846679405,276583965,391325311,755271483,782046759,669806774,106074734,100991958,975704094,596793923,870596018,600877720,11389395,23988081,275634926,593123685,354273772,136525855,986522842,952651019,826304006,64041970,467996236,707832031,824193826,638101512,982367784,377488079,184155749,505288563,319631018,476619762,235331411,509181651,971823585,751296954,343933553,475893751,858125461,460614893,162727985,399813343,255947380,489174050,503857904,700797293,385117747,81806334,931796204,413446078,555831015,827879302,529368299,832143640,489354697,515316579,632001419,610626304,935289909,946431572,910453639,551762717,148646848,398926689,134218,825587812,653552820,811850229,573764626,267019824,930208426,572082359,255939924,984148031,88467344,700490663,418898693,363565118,407919865,216323142,675425347,8378129,617913707,768732932,115743788,620289523,12416482,482097303,801686581,889923001,319138278,203212798,251487111,361235182,892052020,736519896,940121128,328582215,635071642,360158192,267591724,408800462,910314604,319159036,364067168,77489951,542882853,517424218,364101868,941814391,76956392,485589462,285212541,154122629,584267130,312864921,258667035,104859016,112093624,382654561,99908779,285845990,319121142,102605780,962038003,832633467,922479902,178072801,995761568,25752464,193195091,873708088,904570551,138601173,839204559,444536767,525922399,37458708,501918983,956221047,711100267,593537649,251080687,744457267,382302583,314226198,672066821,845954969,180683802,645097628,443290015,567472351,423589634,437770436,506175670,576353084,36688285,512425514,334649266,225285510,935761039,626811125,428553577,218670251,311841997,530764810,965243917,390841053,810141174,124831036,51715564,47423075,752808522,840335746,495619288,654194678,238753756,230115508,659832718,497996743,483948196,237192183,269144347,437906964,144345302,6669869,110972564,86990296,836263675,755836521,21705241,278102050,265041688,914897807,163952656,241112156,789848798,794099061,573527348,300876509,32804905,714148273,828294441,302704931,681502609,129013234,740935137,772417325,693579359,452647464,898648438,421973898,149583010,283874548,992738129,58830209,905103553,949743886,139096951,641885803,456003990,37191227,554646248,7041641,591999180,309975570,560780364,175524048,517678164,827264197,467400548,327206858,173554045,74977070,885117786,141480211,708452099,425920714,651297858,380185839,755910362,116880473,40019179,592917477,404112018,695423928,398643337,444858803,417091949,506706759,59154213,667771387,558676563,782250033,335936022,555390738,911390288,537025447,837910521,483108,406399099,357095128,890039626,149162401,400225101,585414249,356178476,223044779,552517428,318536125,67894328,978865050,5194652,747108059,45250561,433588540,817562040,782347031,47110125,191127492,559692659,370624671,545791643,313916154,136083970,662834007,175443889,774064843,138249752,299672656,763076876,65386422,543002400,949337567,741072757,485625640,184567,178264203,128136931,307214833,127568695,776371636,667285893,352788183,506817745,255347633,623583668,502618574,147967297,386461749,76439414,229776284,45435256,221381084,605190652,810597169,701995889,902576230,832538658,228942858,883174291,553289558,92911489,921905982,205361587,999926197,83694915,85303512,471749955,974432894,218430219,293815411,818985547,843784553,289514332,56804791,298237083,306569074,30586500,958481246,424795403,956375869,776703654,154642371,627082979,543540744,261264740,939438379,24932560,859389312,499730172,312911861,909139343,702824786,29260095,853459608,853964950,324842125,362703566,248829238,260238748,476903660,328126171,355821722,944335876,831454822,941740062,907954356,709360290,208389646,592012106,925314411,534135828,238823874,940337434,802315965,728884658,580963707,578881794,414954552,6290267,31454299,646662208,754665316,969800387,340937697,888817633,372839405,539126251,615899803,178345757,920906818,121158165,278454815,204621196,521020373,195359353,772397657,660739792,867628492,607067052,615161083,437891988,829529090,846142919,749841655,390893657,432242685,905303797,874694374,102008259,134026467,925366694,658904543,52915141,580094880,120426316,538542060,702050945,575955076,496398971,364254262,320427003,378328250,684453274,738000440,202091000,504010993,670208338,454823353,820666543,521188475,499528404,755764533,844155179,125857491,250278587,817234545,489496006,514072240,757863039,491705914,338783512,69949306,598683394,449730094,369709706,193439891,596665476,182415017,118625720,833091962,279495210,159630402,363597980,957298242,905508298,39974226,310670320,981224185,96203975,355799299,886101098,114407813,6000307,509278139,191908190,384371532,869360879,36589041,293433751,251894377,675066738,865020183,651873969,317557999,727888532,26034565,885033342,899203199,879423103,245409304,676592679,648538656,287802357,953005869,538278799,975165794,119392110,648930662,809426685,552199901,992704875,892771289,696225120,377024371,909396255,602401701,711505111,61450070,870229658,766471392,922536867,285745464,57822061,789629505,440199978,652357628,129036136,111389259,644905862,952568422,660580510,938771879,316798982,615584817,546354516,900224144,27195697,751164714,124963432,138548353,938523966,51171793,486196514,655525981,605258424,661807414,632233125,168238903,874196081,916797453,227078122,121880693,913573108,870300980,585069295,518363757,798871737,646163721,708138108,438309955,694632567,16146263,819874008,235673624,950768326,711100503,342355531,217018478};
lint comb(int a,int b){
	return fact[a]*inv[a-b]%mod*inv[b]%mod;
}
int main(){
	/*lint now=1;
	REP(i,1000000){
		now*=26;
		now%=mod;
		if(i%1000==0)printf("%d,",now);
	}
	return 0;*/
	while(true){
		*c=getchar_unlocked();
		if(*c=='\n')break;
		k*=10;
		k+=*c-'0';
	}
	while(getchar_unlocked()!=-1)n++;
	fact[0]=1;
	REP(i,n+k)fact[i]=fact[i-1]*i%mod;
	inv[n+k]=modpow(fact[n+k],mod-2,mod);
	for(int i=n+k-1;i>=0;i--)inv[i]=inv[i+1]*(i+1)%mod;
	lint ans=0;
	rep(i,k+1){
		ans+=fact26[i/1000]*modpow(26,i%1000,mod)%mod*modpow(25,k-i,mod)%mod*comb(n+k-i-1,n-1)%mod;
		if(ans>mod)ans-=mod;
	}
	*(c+14)='\n';
	while(ans){
		*(c+cnt)=ans%10+'0';
		ans/=10;
		cnt--;
	}
	fwrite(c+cnt+1,1,14-cnt,stdout);
	return 0;
}


Measured memory_bytes: 34824