#include <bits/stdc++.h>
using namespace std;
//By MonkeyKing & XGN
vector<int> ans[]={{0},{2,10},{8,57,218},{24,252,1256,4224},{64,999,6560,27370,86824},{160,3726,32384,168100,637584,1952672},{384,13365,154112,996750,4525344,16139333,48334090},{896,46656,714752,5765000,31351104,130269734,445392976,313331137},{2048,159651,3252224,32731250,213300864,32948952,32905828,369662161,979800274},{4608,538002,14581760,183187500,430970617,78068404,21342980,274096934,798002362,828540260},{10240,1791153,64618496,13593743,492816321,478459015,235514702,991109953,980020421,672285870,695210844},{22528,5904900,283639808,556249965,398853710,873074400,402284498,638127535,800172647,536918282,894652214,345903227},{49152,19309023,235222521,222656040,44857055,778549949,363611103,206389920,1411414,465612424,361292153,123574684,725536399},{106496,62710038,343543261,320311359,179551198,119053910,71569916,26688561,10964140,276361591,841093703,755296813,18040312,533377947},{229376,202479021,984785766,636712611,539760396,517807498,874008225,762810697,78141400,740852055,160179064,753595556,299995526,209884297,126870238},{491520,650483784,381593938,359342149,13281624,415663375,403656913,568819028,466414000,858992825,726805130,948323822,863973548,286491633,397503826,417392240},{1048576,80591501,296179339,675606306,728005372,446719988,521984558,451076411,514139993,254743992,377537946,298771129,392136493,370782438,241341644,335440092,582344565},{2228224,629194992,263931732,772509356,257925944,886574562,517710622,45034396,641400119,666236692,400972656,501324507,641007509,662856093,961953817,778606538,787500841,570144113},{4718592,49846422,372584453,834935980,886918104,522764526,876358422,273430089,414003353,833184311,257879835,542116647,89458037,459634688,999061504,530436201,670392343,700737193,387531847},{9961472,636323646,757767926,36625977,357683257,876550085,888255084,273955519,140055552,715415551,449053940,371191636,867354140,646420667,709792481,17542801,983853488,805989801,561849348,95472904},{20971520,369324057,100792160,492860417,363147536,656239514,125142630,783362259,400776013,923841093,642598509,33269767,752140626,974815805,953616006,300394216,211607710,661487326,461236051,665017657,736367570},{44040192,489031556,682050548,12954717,481173243,236399269,153957089,910123686,9965102,759222844,758597206,133627892,58527131,799824894,808838120,143533820,849349632,174202089,709704289,827191035,494889647,100824653},{92274688,610272830,843729803,808036836,700767676,153853783,454185146,929883705,121701020,918130987,672148173,851734590,219197994,661192067,757123837,66222030,15688978,822756327,893752259,469238546,373242933,627473926,53789760},{192937984,260352983,837029691,756500386,86975427,570388851,413708661,17888523,437510193,332918094,893559146,561985599,666226198,875161987,165405345,770275320,375524365,377786521,868376503,916774919,896101472,527559334,204720967,861980712},{402653184,69662456,196560729,364083051,816068963,446608547,551489393,1413834,580101888,230349369,656083124,668480774,691526895,486645396,469270091,51194161,435648212,340855732,234158781,570348995,778886190,334024666,843704810,63029012,126607859},{838860800,74797903,180010860,728320972,661712142,303466113,346476110,576478663,851018691,784596996,73478743,404934439,782419036,687916086,672874788,131035541,13442114,571584603,15752406,656921178,557882712,286248798,578554434,413509352,106688762,241069168},{744830457,821825321,295115230,181133459,562063190,364706905,248296818,262095310,10185307,388860340,287520627,555045329,368462386,142269103,398850613,660095942,333896403,671296376,966584498,66784249,565925839,468397542,796645485,282335233,960903507,103309588,159577844},{623878635,257770771,480748087,603310409,923121294,236057203,798278181,22944171,101837635,618691573,319556084,997258748,962816760,486954797,507275008,573990791,665025523,167221872,362417296,102700969,885506030,120673700,991631368,673418365,845379413,839295477,596743099,127999019},{516192719,150196779,124141023,504767608,843180758,434162602,881454572,183275115,18221993,559113704,266375966,126067323,740241946,598095861,127043930,747960860,758484851,16441052,862895251,861587071,54160889,768692183,730509188,211398626,388962986,9266316,308584492,578580550,739565197},{569256343,581243749,301158841,964915932,885802680,511473523,13469827,440474212,180676430,438821596,376947368,741023148,14690704,378047149,203004594,547331628,837186507,257664604,548892417,895529723,798163585,523453321,884776815,683456052,749595948,653982615,434145093,910497446,446922391,588572026},{212254496,135691469,423014360,29969141,275125012,886661929,802425023,83251550,791329293,1317334,688597938,961224282,323919311,769846613,972901117,448588198,389624040,856035159,797598548,652352456,905327408,440690640,695997485,48662036,40012328,559916650,381885006,222612356,206670633,764333844,472004108},{571992626,582955108,565573438,176793278,412603867,351064470,976731363,820116973,758942881,931568610,245929786,758920027,190362682,34790299,163659827,73159241,778038978,512414425,346976436,470197885,523233241,364964430,776437179,273072275,353783743,482175894,15809657,183169833,170088810,770984975,420087560,198573042},{438952513,276507413,756357765,18704248,46746007,468468332,272500588,18729908,45928768,335111866,744212450,285018045,841970553,828222256,174430220,845425868,771214941,443057781,839640382,60879950,843800044,663016739,374435780,239841369,348420971,858263107,487498181,406860157,201760132,276249175,553400447,483745799,281307947},{467839555,412448534,1687133,767210565,707212977,356397695,849202589,907664000,24287785,652659984,447209742,152985454,264089910,18850286,684851587,601458814,679110579,854589436,795041622,199692050,882314811,432587665,745105346,321897688,960081778,839983194,905126950,552060470,25679907,210892943,247969933,681181291,463201518,286342614},{115548168,986124494,911772915,204499401,803699430,34619588,147203820,820829354,892878935,809984051,566441687,809572514,368290198,215502282,261114625,121525392,574341542,530540523,945514215,539008283,422632978,163179976,90048588,194029713,391677362,685291540,488537620,850117400,956676887,599907062,188021841,158793469,305718550,95199856,686185824},{590834466,204710144,267189143,864730011,184726100,21187296,6295788,254144785,428800095,847791492,196397997,194343673,550503478,223754096,33662897,310267272,644469316,653755501,803921767,574154298,555485371,667405665,141655903,515431994,351945299,657998766,738582701,23956835,288696682,526120783,112188126,673948179,327910197,894290185,222501487,48747915},{901145185,353140474,549146595,534815064,283533909,600262346,679688198,87428890,288108967,643343213,145949539,235181556,229218975,224609724,231869166,428249135,114236909,317581404,951187109,411829211,886996239,378453678,931496978,503029747,527260565,954403959,347139570,440768028,312608528,108805772,645676182,554492976,887251920,980489735,723285278,505106309,30658266},{241242869,276451548,118146472,729900484,752267336,365495291,472080666,987992575,882170106,570780777,221477543,270639908,519450326,393620428,802111694,893229514,304471775,62359059,478779548,94783096,172916562,351274755,118055075,6493179,502528733,856716375,390982256,416847354,929499574,143888894,442635142,666974371,268945061,128812014,714614523,641971441,8073670,198584024},{360390757,480445036,158826312,928628289,819987322,704079295,53246236,702126190,832505504,712648783,298727528,290954875,617690245,271425213,309067950,605804119,948225573,722758189,676340854,364209227,302152006,956644363,124387989,931069280,703354493,502202689,737585213,491237413,422300822,358765208,156243151,177461542,625051684,916923956,74531570,15354121,343063124,696129582,760183454},{476591552,394606284,380266951,38770853,758223894,947840934,638777362,610873321,433099984,613799587,276694655,826682571,483063559,578160657,549582108,454012166,487265983,953190855,541816115,497442387,603072753,181296297,970900713,495226831,865012256,572712017,774685086,923147501,788438404,966216581,741179364,377376758,603025879,389960428,225857679,277308371,414417846,251808628,321963671,258844241},{464803180,43632394,500914616,172001466,579143283,769887775,812678646,123498710,411449805,273088682,623907947,322373167,458492388,274147093,465232690,359024373,316491766,305547836,136304743,276312127,293631068,274765121,955752742,843045456,513003061,820690989,115561569,411893245,235566771,132065129,442493463,651247973,446017842,65391532,668838735,501027812,112608488,827986042,463575617,168973893,646193002},{952846519,710337836,923045733,750743335,653659359,334223336,121107364,742238115,918997952,738201460,129760583,672348767,157329874,138265819,194427314,997313548,519526113,508921444,725745204,233018123,32556493,733455041,637324526,635505301,927878029,810255631,118344647,522765140,539447532,653910104,351918013,19079332,231301801,875886258,444838651,440900590,138879594,581990321,944179113,738693059,815576296,972078799},{952173349,869335449,369732015,207396679,994754218,954625967,926284837,356890539,234978701,196701717,271510233,2978,540729026,464879051,122106199,150617325,159608472,36246713,507911142,933113950,315049767,388183661,78001496,871858522,459590365,470076978,27030724,918161294,356759280,627838088,409449737,50198271,131900616,207411493,213388157,719573610,948193543,28483654,813346509,527718273,623960840,356670994,897190473},{997307327,822972184,189124476,305383534,405313776,987820102,69686047,302742765,799779436,5061709,830721731,373136603,303757536,836562381,134006306,897375666,419445521,656735091,18365970,429794105,104847150,858734314,645147380,402115453,653155604,707805775,731517940,607875021,902781255,518355642,840740201,535693464,584361745,558145873,853059542,655543287,520576435,14452952,381150042,529874600,736134125,300018502,866170448,283365309},{180535912,113814084,597283603,868918386,52613681,52809276,832747597,541236279,497718676,310450009,839848132,701048333,522322598,499085515,29015037,982365817,386894087,870869988,570183421,548103218,129188408,152622937,38212642,194200075,281006607,535397023,772916891,83108123,83525169,785651240,530844738,689851645,259487355,991133697,869237064,413937707,372342278,803692823,137597857,355306195,168352013,316927704,262255323,441512125,488780441},{732914368,276134897,752277201,54595503,40068334,336145202,864054488,220089162,976430417,217433367,532426604,167171066,88556003,746030943,622867086,58871886,27839182,11693121,460948735,481136020,938269674,750206132,229318526,387847319,79158249,921032683,773284653,597382022,508386296,570608068,56103197,160030040,122967526,650668670,19909477,192636484,585646056,705099922,167765553,415911424,600981587,521576042,172492674,921344270,6707422,951115850},{209513810,632482626,461679988,822995534,586727506,118378290,529025880,121466597,756740957,219083216,840108251,869280244,104339576,86688045,503897196,97924985,648527239,60275128,364582470,494195256,756676338,771948728,996807540,17319789,155763918,431337502,337101965,754226085,330525975,366863616,5596676,313546422,394411432,408036258,902255282,574382804,846854282,581018309,264674489,835026921,509504105,856218710,453053435,858936859,357676906,849379211,28681383},{906397789,309681676,657004751,865067723,598270013,186181267,164927177,359176736,491778021,510393499,493167447,349376232,564531645,743680337,670737264,315474534,327085538,69238197,203805990,575217276,171239603,650600194,759291539,461416769,588747734,859403744,622546204,346835641,283895166,391194526,908513942,421351370,669518132,493422693,159697839,784982454,688026042,862453936,749076056,325108195,666832478,240713639,922887481,582183083,713370274,826747338,513964191,942905856},{787535902,165746450,869158221,75788964,57050038,806001556,781178736,626386919,161465182,719587954,860431354,175421762,356329199,805599971,465911028,425813617,652255325,871730418,319252566,219019054,303197453,566734465,284854598,245970241,318474125,962765101,574648474,812333998,560334427,698127939,413895700,357139060,587620461,695175722,175407042,758648023,432404181,542564738,446904628,978627435,248692833,552989105,102653740,49349804,785736956,435585266,258656023,461897336,688391542},{524552459,207343630,441189780,131196712,146880135,161139687,943520441,181649052,51501862,73321931,634240485,516382989,329015859,839924313,200414411,305523191,505477969,130766711,247707123,527983267,460720570,902284997,321097208,913033364,567188990,483990103,104093800,426599518,114417774,345995063,171054520,719539082,995235901,219505507,660909045,498981309,353119835,527621798,230688781,740577144,597714872,477547305,323378350,520747510,796310234,660157864,657490264,348994205,380213593,525884844},{948066242,752343737,622986781,417243027,708760259,761879640,100888197,532342833,883519152,542940650,319657427,779680055,371921475,937737014,140038775,327653972,866482942,274456290,207259346,587894925,524138717,702579690,336418579,920268338,205320282,279711665,304852299,569884339,564085626,550749077,118295371,565145466,386792636,775131899,257926068,335480393,445474282,913539241,407702559,654618668,513894559,592219959,719655357,933923178,641153762,846992929,175592083,185935879,42516081,750196908,41980196},{694055125,647969738,924857789,892512470,217438227,770470283,228903341,868597824,520196756,72740628,341148996,2956758,926693321,149141122,175151913,844033395,418524887,222556608,207525277,850967566,73349068,9905442,196101167,367568075,256900035,275647189,462189999,283099306,869141450,645189324,411076440,721545687,809205567,364988360,32560442,720141674,951007031,743311164,514157479,768560056,798115832,945955360,269189757,539385067,993702349,328623403,999282205,286635677,717632229,693614416,534153165,386470834},{983955546,116724816,431073837,494049039,93889561,454481791,205608869,514991555,52020466,904475621,156906682,310947337,50804217,483406959,754935033,5137984,326424586,378431051,397273205,478977415,544221721,790996926,635755807,210696399,562292070,975145751,878439026,147033890,471426792,731878521,174432921,178606844,893694091,12615393,72170020,17828701,11675145,485094555,808508204,607950950,531733692,337463867,435937054,350233481,739264578,883232608,366934611,658253800,473020645,486525891,37479582,237031232,476933350},{159601677,868621296,650866156,627678766,298898609,609701431,639928164,913424680,20734077,96847597,640305266,584938611,790628427,945456460,319031475,249042009,149222576,37444912,880817876,840357316,444806896,145879561,562007125,804774615,574764995,711070816,835628438,441450884,58307798,349531963,221435254,24803979,329568861,772339639,997908874,445379063,633167867,261102497,28695226,902532465,789312028,950443969,211094581,266260042,338184937,94772426,879538212,296616291,221504229,534557151,547728455,528745313,791806695,752854574},{702584552,161204404,309747870,925561734,206759112,266212373,79883029,727328467,212634975,689097749,772764232,658304199,179969340,597128592,945640040,982550888,610447579,809298197,323433908,65968489,168192168,273088836,780999548,553482019,778342877,516576296,99000638,948650475,214358027,335727799,552546307,134210849,300320429,609918039,317093162,550558937,261848295,537181637,682500724,42121816,323983768,767495052,602192366,740609557,829177894,847790573,18329935,601033582,598818527,70995388,618969907,226276760,777483602,490774333,920579153},{171931486,149634809,64124520,563648239,720759483,851603292,322726248,104513753,179291786,441591220,342383782,261284489,75970878,186155625,588424044,433589864,627998409,235718135,610208300,173102758,113919184,391799142,771876313,689969907,932695427,524498557,411344886,761536325,384463700,914909307,613264896,846383036,440188383,578211283,540815857,17428074,606076737,763272241,687696264,296925845,868228682,633687635,313821884,478278391,685044036,340025738,303647487,725580923,121283658,858389513,315137927,739762577,59921971,600105848,906027233,963866760},{877387757,446969225,557030275,497439166,205785757,878039825,51106112,967642133,322338346,334179729,939162088,539987818,853194182,230736453,745720736,784850634,822928360,800642001,34769535,178212341,607435323,558767177,194326267,572235659,340380698,738804737,418813809,354062653,145598890,89964057,441538665,705666452,762396346,325196984,986006363,574497994,952896363,481970227,14549979,541146923,423846029,398795017,771913189,310712464,483639452,193056502,917988610,25309676,82058695,896726824,79727367,803418228,329405263,419295888,538845790,863177955,52440366},{821825070,335102062,430249859,883185755,522087864,563996452,163218060,951944345,517588404,919416747,236625693,882604844,999144952,37078210,226509177,377451553,153937662,330149688,307463101,146602527,590269359,441545298,726907580,380593896,197691935,536010146,959184780,83588889,718605766,349933625,275225256,862865760,985183986,454972007,95111874,653818124,245320981,656607013,849983620,241705426,47681860,607942313,369196988,450386572,941659250,30461077,523100796,360564305,996726572,795027729,158697468,169267326,843301948,802369870,49345259,799204868,51827902,648227423},{777749259,987889368,529514514,395878428,856767130,871999155,340697799,755985871,117933634,791421372,439676870,689785185,749999964,196644732,343786536,11521074,912969026,513927722,390710054,565664264,973157347,723249007,959634594,382410298,182630312,355898181,364323349,81466440,77345576,240426428,478826469,478378916,662340777,481737659,983817384,894792563,662055890,138636521,718722892,151873599,340886292,911057287,65411274,342056003,251577127,401531288,171933431,566769996,525920442,706374898,921737704,140549777,530869566,890632767,706283363,644198155,602646605,269135191,224231848},{823696763,911417636,352118389,879140538,486042519,572162134,5208979,500254181,599832630,161844455,478145256,774197098,167589625,556744731,14820169,308218462,991082574,345216768,643162516,106184968,128555213,691993087,363697043,249331433,857029039,467107944,401245148,426798333,895549661,620227165,814233636,912202179,166492678,380931223,569863315,137643709,72753204,114388781,524048481,146816770,523647880,265597267,990828314,752238144,594136474,455422189,281383715,828568980,775631280,183130439,742770082,426360855,265449574,800763930,357004964,821991206,557944587,278308650,183542254,133288127},{183790016,577501532,344714930,894444694,988893730,282311526,278684682,769720078,203289200,798592649,162017228,555428962,692517557,457277426,464892808,149837273,877010067,590330753,442479957,1829947,648276686,232959756,707935672,460136989,107419669,774056672,840224520,241027582,121961372,404288273,792651521,250707517,655569177,536557283,2837654,214624224,520545001,56177891,967259043,739456929,663006738,296452933,556665448,38031260,323358222,827076489,878214206,385008604,762031666,398207813,869353824,389929487,652910176,919930374,79944825,707205889,418406613,980827164,790423182,850478389,149349410},{440373033,262250503,123825237,965933588,369194118,916416973,125580228,334372932,82521392,985859244,35497063,601844269,542925194,450759089,82606515,19332352,461610466,809316087,434193560,249287215,303451330,651808245,491416720,174704756,234196442,277371205,476378964,42204118,322993013,27571358,954459568,158530030,113169304,918264645,661460021,447956166,505793962,396540787,903159174,836479117,977711755,405608817,742956610,140582440,556186036,717580968,488364,336735876,124979641,294928139,962509401,684892026,463346152,881469144,386261073,972061189,609589243,945200680,98671402,793245642,492194371,239142404},{26332061,375989258,475163051,298218621,830155360,996572862,173464112,671386857,321507973,59193364,521448841,780456969,468465107,635352450,630850451,354328372,466716944,644610754,375760720,663056340,585944603,747469004,817058183,149621628,562519167,690735032,941202735,743643789,614346617,188396552,410260105,442497808,857549317,995857633,947521627,328195455,773364666,483609560,638275452,564198170,583909204,740888743,675881443,639118555,943121998,440659111,641366488,594463888,418812351,344155607,368253365,286632934,155324178,172243292,554270432,103057494,192515415,274345477,317132878,145904331,932973562,450752830,803678704},{343836126,895681028,820100609,833846664,670876100,47588608,738291242,756039,178020274,13286310,403195063,580200307,703685630,639779056,39946599,460114878,240019931,332103121,353005913,912705046,911119666,577014756,162763772,290609614,934202802,96084438,226247631,637676475,167087098,184511291,890055752,565653666,489638643,835851577,969375458,34476539,409238192,583012615,7367518,142863783,364849048,745734074,113579677,841230546,877579277,285608930,445991772,754628005,432134497,995787506,672947611,521403228,657641337,502620056,763571506,521773284,673588891,129222012,838900386,133315038,693572003,638661355,317353011,197142159},{270016253,990182839,958196070,883001115,164920394,834170617,710956704,631273670,409608383,129901825,588048870,187981040,884037179,239071298,780576839,243006953,424428661,915437951,815949479,925767777,492079160,131578243,187150889,16963753,315591136,642724817,766928178,580813124,113274381,390614760,857223156,453032159,968423985,584018099,807012497,251689120,363532490,904848047,348685387,297712995,631491176,229853699,488547021,495683798,91159121,431269850,106831805,645758880,182579228,421597363,229459066,116835812,99964022,252251122,327945491,648358302,514459286,251598559,989692814,354422674,652580551,433360423,753236588,881831075,350958507},{704720515,879967803,543958858,983844641,827505289,346546783,124668028,301686824,390140330,250196633,53084116,833655815,830658330,221852299,752129406,289037535,512974593,897416059,435614723,379323896,669567636,811795354,231310595,217180167,889649232,661585068,569836209,401249238,418075668,902765547,445197935,903284329,830563179,963091993,794314609,426613192,688523940,815965970,106802048,258447879,451542249,905124808,101884415,119697783,428901943,629243667,690817718,422542478,921687741,959645756,213415292,762938791,113989033,321964471,169668682,671458066,724263301,866809137,721768394,174313001,829226894,756512670,536358636,712423008,885154418,502820237},{738817041,368161295,20533821,763418626,992929263,977294988,493459700,297195884,841968538,786205178,594982092,906255507,987147213,864527256,240471440,598267200,952200024,628712010,44799483,668016726,294664007,737695968,303997175,256662725,922153304,179205110,639140142,808621782,137597719,590681794,696162046,264747601,980176960,994272778,302462659,6973119,386907191,371475364,647548490,737184843,979121991,841246473,138802423,13116471,566279798,473812306,178023468,942102534,720706655,309132942,737880097,679717674,815729372,356452856,565839678,30110536,373516341,468899705,718101219,459425254,304513654,313088908,396862079,878724603,65136568,144441595,752727832},{136386104,289257585,460928903,38070354,124960878,701337493,916601415,912893308,825337921,22721414,635457462,674811273,831090236,19050573,149959439,809237633,75433656,923861188,546091331,774865336,894482668,494275034,356962513,95532736,549094854,381564679,40262973,449456235,987764523,64586378,671688388,796714154,521004614,811410812,345585240,482555046,176383911,890846513,920603240,998275152,725725013,771437900,966387086,792473509,541236020,539105783,446241681,801565115,851328631,492965983,664584027,955024029,706753663,267295930,293060467,865359923,906167750,967580034,805945471,431208418,211534610,850435926,873388085,247009862,865409104,195145503,938204197,871386865},{590276273,422093869,358890067,295238023,754077313,931270763,84201959,359212996,309905096,369045235,573558337,387913367,789674057,52885948,238013807,614859744,202805982,141690878,923860019,948969787,739858732,495487068,31828930,362434767,177303069,963968253,168858653,17547546,427924735,359155350,118126418,272998327,343755678,814611924,890533792,162873311,711197254,472002842,570681941,650849487,789720637,878941253,320573928,761761727,545669315,24566620,673133680,565212424,366237619,227753402,888970009,905613471,662562973,132670243,349554290,821899758,606495940,934581540,549085543,86068461,679813679,505058776,246609894,499860152,499112710,751181808,982299102,666550626,338082736},{815560669,929244956,496258123,621366,550336120,672253679,684741190,521476456,664310359,369704041,259526106,42643133,217188327,300199536,226825657,35556850,860510934,870366799,517869634,141119992,624175703,320913815,917382587,413778644,31640818,893636260,889913897,25066672,687419448,200122722,751186207,396181826,94056373,44596539,239964672,434771583,352625227,838684636,689381276,269138797,157619074,200280115,285120069,799710464,946166332,424595956,480007004,832989527,302199044,26334034,417683863,332548574,663133706,23544038,112462128,142201611,5238886,134546172,486589412,973840029,157860459,257238666,168495094,365159663,160846624,650204737,336500379,311150522,827453649,566806799},{901137584,776624908,227823926,625263141,457250319,779284378,566933629,290323672,295697706,479015726,636226555,551362890,305159027,106647801,326886810,514468123,269255701,923531537,170780203,431366488,372106961,649378254,700900321,167204267,788448725,523506188,449994861,696380888,112907788,259319745,114465727,852824317,14272333,222157795,145669911,199535720,830689483,501083497,59402486,991401218,172808208,61724349,459445636,406454882,411039480,644356389,180684199,557952554,625863102,299476996,664233943,381926368,584824007,262361898,393512484,858688497,355382896,598130222,682788073,547741571,370932998,833803783,453253131,561628445,96804679,72321641,613035375,491263567,238115247,537037028,174435924},{342307660,296544872,882461489,237097218,674903613,969551182,247502149,986233426,482918647,804157256,897678217,128745614,975540909,654538885,393010064,215986483,887664510,891785927,683355927,883476339,271668034,107992529,230848761,748562607,610140599,808504980,507221679,309020219,96968364,759889587,111135894,844399040,241352212,920285655,494020787,563350220,941576049,445190069,742164973,872584723,475844784,990363941,438765968,167260861,727687403,637039908,409553511,671509587,88705051,51831424,663171947,355256900,463119157,639094131,392166963,877457074,600803271,224144250,212697250,165748652,180091283,79017716,860500175,212131965,130328300,922055871,395068815,406746902,813282634,986203691,374576770,823030120},{764680325,789645102,414509075,739393753,637831935,388782201,676282359,235984278,88602480,730557073,927653785,167058184,503976391,640411360,893299192,662253869,717075628,492982469,22156167,873386108,853625555,446562341,362158383,925463951,735976562,23260234,608445275,266849870,201093312,906880870,899793545,4661538,913133475,276698431,781293086,523517224,44174168,576831541,329220492,6510993,137284799,42977828,124659845,982347103,187707017,498497599,20745199,163866290,212760992,347144070,881312712,826070940,670076136,655618028,867558369,151198513,185125174,357733110,486624231,74963979,464884608,589040589,619210053,696991747,522156711,903641679,53804307,225245970,94865831,837283950,663230821,212123726,175675710},{689490653,68966750,196688853,466507073,357453271,934943197,980380250,362810030,480185229,769228204,998028348,585504144,905322030,941092578,974998271,96538239,211423202,798616303,543877791,69153508,72196622,413820104,414716860,421571129,815738925,855926339,411141612,591289996,794071652,972725558,783631823,757113388,89920747,18970551,2166328,513828527,721431511,858769680,873690694,718992332,141729936,513179095,519158185,707997502,482511477,637627061,380256354,764389212,513473107,595162016,439589274,646893917,912769829,858249839,330949291,378616894,372330540,966377903,684812676,394875602,374803985,597801090,650194106,351380627,214614545,979208200,519197932,561956780,196337544,441548540,699275473,42585001,178737390,613983717},{699241319,306994631,941365666,180227003,327489725,38876951,404013220,415854113,743456580,525615159,370536082,990274746,569644722,140222152,515352906,890933308,278733375,380749241,892644756,741176389,21885618,804247921,303181995,663590981,898271380,263311517,2837850,874080435,660319258,796474210,763852696,893068418,532321046,372362961,600143251,328236095,41296307,623266856,142471519,12391655,734930805,667398450,344461732,466905087,203010383,755754837,707671572,467182719,444834067,784805463,647727614,137500506,637141948,162960813,403294196,918360322,429261364,763644568,330301210,233859202,459273175,420855440,940485658,889370735,814502553,766429251,819804437,153979435,644687326,951529843,507115414,810082167,452952312,667444721,27947594},{39002664,221267029,383903652,139593275,61559007,732060983,719875919,97761758,850608938,486921388,176784801,796943578,506935470,460835966,891737254,392181387,533284465,167987693,154675114,632711310,19802382,84570624,675825975,697595042,270601995,248525057,823898053,421781723,954673412,592145984,447591070,446041418,249448072,826482281,402752704,858222327,391424721,426140294,492620829,390014074,722581839,528126289,222393081,326526024,682676925,522786295,825836959,485420980,800647880,33763886,714282814,450053404,174527171,719944508,311980327,566795984,274390085,148601599,310528582,198717689,203365048,355275470,187123849,35056058,653384772,35939885,722181894,772951035,202266144,271062203,980592455,336526816,271000920,458323503,81545639,438064939},{359045401,564650509,9378644,890257703,949078068,343883107,661168729,75528715,666521166,112836668,885639766,364101983,543828334,275094906,605248920,854442861,888627744,933057257,129104617,715089578,278665766,443101449,806818681,135391635,839855018,466258438,913416267,361699076,993076286,301340301,460673054,887232994,599343913,709135238,212546635,153240845,116411698,250061361,455237243,150781936,278943108,399135127,692682512,904547404,236309241,679488144,805057040,865555246,979627731,164921375,829956146,466741843,943026980,237439453,211206578,862076438,794031255,288265961,179081904,53473338,771193439,389479242,722624307,965958443,273693270,315060903,441046747,571157184,349384677,828927576,319024760,205077069,741292735,371995627,969635234,444543728,461569938},{280170941,396499786,932570769,412745120,172812501,943375555,506641100,440814521,269530024,564919147,798343075,783187758,867841827,564755502,83229879,710637026,206433111,812618775,294139479,8076309,676940802,644806733,451537545,772683510,745513296,3190191,215241565,260119703,378511960,630811895,149822779,818276398,393416588,198679176,335856885,433465015,629995823,345403387,225658304,750464866,796865840,820119162,403058830,194071820,196086833,36967518,557135086,328648695,343086428,2113261,894723050,274632027,925686060,286218194,284837949,756574124,59385457,733220667,586940959,95231598,892746733,986053596,36630510,462752701,983464485,884018077,613302696,799838971,809755781,283159212,548313986,589861958,710296485,729657336,376946972,172728484,500561009,546560028},{684502167,297144156,310507799,871008758,906939795,356985555,791459189,816835456,738484314,774984420,628108259,829646875,709218273,46311525,719633679,227673616,516204907,45845815,123732640,984703292,911165286,260444632,946245012,14403947,24702927,269871392,935179247,898021888,942066304,522309986,859453801,809518193,910769225,216881755,721258524,289695551,781191483,598136583,673080497,73685940,881091030,529402785,435842950,757983405,9638054,485647082,633560710,9440786,239332205,255059250,849793480,33166849,107439350,229660824,558026097,363122079,767589847,66234884,738064705,643965574,233035354,399651552,819564500,983457609,609435341,150037823,9022220,98443237,380903233,584726461,132869169,264152216,804890605,973212413,682866968,900441494,896033729,362195369,895202927},{617324897,214366876,562930179,391459594,662027476,772395869,238316764,997062161,816683971,694440817,113196116,212088425,761114609,319358682,721428697,366803816,699049031,386765239,293514791,795885736,451926432,877693625,334136161,793006981,317567629,247405845,620651691,324600450,863216235,172992055,586518261,325209182,142734323,799733853,660093456,23869243,656590253,296105200,793155516,510816126,340314084,128319269,32289914,223073225,966965245,989578705,182598577,839685856,217156338,519451499,47411037,74327527,302917656,452659677,247120617,286605049,267745681,474592300,580326375,207025802,177966065,709400076,865687362,719340241,474197780,747948272,315375461,551852340,523153125,625579185,673476680,191871089,540284077,659374663,550083382,560814642,368103310,145757032,760105651,431746632},{731290927,611903866,535316655,139377116,294497267,321250020,159680457,783447305,485248426,504583707,269118104,303978120,304428370,160667342,859497614,673655098,915376249,146739881,247535906,173051947,880767538,598697108,1412519,647881965,814338063,623672150,575969941,590423451,933306079,785614308,456482381,898499862,856717172,301221305,775687944,173117428,860365329,330469066,523653178,20857766,341816818,169714445,49567119,160205730,566679800,226000992,805597653,621886289,385125339,574947925,89193979,713039623,421964215,68576385,707680973,889348951,886271552,438261421,606245116,61263587,279897402,167410167,871813065,405861739,893779715,705285019,172317409,467374314,815608358,226174382,186873968,346029590,381120712,586413957,373093923,647873713,954946889,568328793,318210616,348280709,443078512},{455864120,742121305,275650411,607281373,700978215,650102937,302614507,340016918,36571924,73503208,158593862,60487491,345531983,964317286,818178322,897971096,461660278,953865144,495520596,282574606,21379844,240142402,605373527,764738373,669863283,319436124,663394137,255583381,103758287,462723067,620177124,148193759,255891057,411528138,368418592,133696145,271445853,400580923,843437236,28435005,398572540,333115450,848633381,695238141,36097138,264749058,630255688,859129758,621692435,551348502,76730601,796177633,264256190,247888959,290018936,205982023,111034734,659062585,574478039,131153713,605728538,484798963,736661613,549528754,373406336,968422386,139046005,128682533,734874770,572112513,606766527,39293663,810280045,979639529,428683711,702561966,431191281,126318322,237565858,731841745,748271461,972753815},{898292786,945593050,640136857,588385816,809836989,360190187,622282906,661073225,206596216,562442449,53245957,200372836,6935354,779366686,150318478,844695097,37867292,273778550,806462000,552225280,649227726,335782502,244318156,310693094,340363740,592556412,589640833,277717181,250031958,713485255,253380788,314445159,35547855,810873422,234570053,895757394,262358306,601865912,629899477,269765995,515230398,845921897,717795298,154831274,226488268,650223449,407566108,45746258,355902307,798004359,799464926,466541524,92025994,824222132,194604813,987228892,462548999,181388665,454961878,38947243,184732431,633720743,346396563,672902253,985224727,744170692,114562910,589096056,401540858,94924597,619735950,745202561,904441524,367443289,169439454,951324525,369007361,18322452,462608873,488646110,456624915,955927355,617930628},{769714657,994466569,710688280,701823905,482828240,187618894,589198118,357947804,474731920,479845689,440386994,987307799,469921720,409612588,356542299,205988171,785293483,58270254,50242762,578061228,218175322,410665218,32122295,573174816,871338224,129113259,918886656,161974470,619459733,559221230,154999789,370377930,607194306,639173626,418551811,256025470,971422135,661961194,892389660,321568367,197397492,818819900,211771668,77588893,455377040,290338752,17251107,712598739,359153833,339000387,664808075,990445763,367762639,800338165,296361976,308504860,134840948,207019996,474499058,728600961,486337514,681742386,972814034,718322885,491674827,470811710,631833036,637719839,329371935,460134838,764322231,403644486,763849260,644180917,677699429,14108569,197412674,542305316,595938609,547013936,509216995,382955196,922351381,367826740},{485687491,456461985,443316563,308593706,639807444,977345465,601064121,896129583,835016884,501069235,901870034,806993553,798478699,930874438,927823396,886716447,1562668,380213781,424912727,747224636,373496919,261657583,814613284,475558212,223700703,998494620,179242541,834371614,138823096,12390762,458061334,14167455,195892428,422218513,132943622,654020850,982690538,194927028,552016159,891971495,714973507,308934305,984219460,449672669,645515658,948253717,623800006,997911251,159621778,968716009,386894547,472118404,370568111,765265692,911851790,662906143,626728119,14420912,77137227,966626438,194391522,661928679,679883369,369975375,262195941,506555698,190400164,319034185,561880154,824256417,351258185,747674778,327938936,758650722,328033036,769650374,755608325,333817199,653410302,609151748,165679629,187059595,836550282,588749578,539142587},{863891350,788572838,175520080,540339540,295872758,489510676,908346587,136560461,227145897,962195137,229153974,126815369,252746942,763401295,415520562,617777989,621169341,412562033,899404308,458434732,837009218,794349938,598995572,543652945,607801178,795143956,630448969,173024958,815629910,356628973,596142350,593489081,404072191,567609338,128797459,898676591,950927251,361339054,337846408,585240939,848600723,570365546,621365500,353032704,809630231,777550101,138249908,845741557,77601474,69031812,596010394,882421688,625507895,156293354,736249540,239016651,95515399,65066573,59870333,804267713,623157834,567501881,378815254,182630534,874332556,404711664,298484112,842585002,740750812,504708277,334760520,139065988,696443713,279974745,469146623,876451757,816197672,215663610,538576690,724173517,196408555,873565782,429147616,539249666,17553686,514039930},{512815429,623279163,311095674,688552771,517405252,963221973,65441816,871592572,41230093,538915859,630411355,915290075,575090422,455291609,773870183,743400095,855791697,420183167,11082458,728196445,55897804,123236455,534538959,958766647,383986868,35200439,778990862,328925034,997008739,203473974,98307401,741920690,25263613,514978581,978484084,147529887,265343633,700438507,801864239,585684067,69202714,831910672,231302397,185794788,574857968,397262795,36787312,897775133,705705144,410923006,822232783,356110723,978248082,263566726,892754486,465854496,766408654,478661243,490424657,303709681,30565538,310327947,686092247,596020825,286385585,302850194,183486776,354985312,492377630,592005825,283096251,944770041,280067839,585930082,591483528,716534135,205818822,721725771,346366272,671518286,181185198,358377865,398050513,956771311,520688435,759997538,351945083},{595696330,642519464,680444119,377039259,557443771,499084575,912887894,627268927,110012314,430538056,131700390,365744575,564131422,893458008,390582558,737765487,549635805,32067364,681577640,414535082,347044685,457762633,636422800,155243769,93723545,240883828,351499733,563663183,753610065,894945652,841911499,657160517,610476150,727066240,529347863,628967099,27175135,37505877,594889659,236081587,881363048,938430126,391011217,830310213,709375887,734541388,3796125,356498278,566830268,362404566,900114745,25232133,669783069,204947118,109960455,542318513,589603259,985287258,317761139,372441701,371429560,686371131,192537480,868705965,210309681,831278739,763677140,440806275,253914327,830420020,367336329,853780162,724294195,31582084,114620148,863825146,361134322,76090432,527811264,483549796,63257689,496095105,806928422,572312158,731349451,471367755,700786528,68959273},{331523604,245604331,466022168,556573413,62736264,789307660,417930010,691842774,77236994,263018685,381574856,825337297,77957783,363128747,387876310,241400433,510380958,532437602,830122246,275843327,215429088,864996738,653855962,533038219,298503357,346606772,955153384,66512728,908744771,948142397,215557641,420968067,307641488,45879135,997681889,575151115,909106882,558496700,608398972,823780269,960908879,502168514,607549402,493475584,863129380,493381980,606461747,378751758,420178756,154534350,294503158,359592177,765183807,254842255,637522380,263063142,195283558,44120411,602583576,334172116,563337872,791148885,410973230,743806667,265278172,896838903,417244031,746206928,897635426,618299084,325476097,972389540,544064485,880624394,13428561,698214881,135249556,731782896,705676371,503622802,84998100,486692154,919573886,620392597,780466394,596663945,875724397,796190865,870822947},{943309110,690950845,841071496,139752683,684859552,595163163,262055308,644387118,543508550,691306623,192940454,647936834,613059975,865811947,422907688,993390421,291714788,656310416,573835520,775449776,509253445,633418512,805555728,624555822,165058480,112456175,912800393,817004618,275632128,742062656,678319991,136094225,209196579,555401666,798269865,505229712,851227889,516303781,848469688,696836621,991939489,29201074,466636192,34632694,368536022,775991067,474055369,165312539,942215232,148234023,718074780,239709396,552435049,67620244,566521598,996361582,227543179,421287375,369936224,913438153,78676994,477758946,971060519,412189603,907754442,566178915,502117181,297894761,488765173,651177801,597041438,174420398,286559162,444436922,995171051,905836145,957730927,741313976,916152622,16704005,594990448,191742578,801505996,511428150,179717097,37013083,236657951,495575372,393073755,125889175},{447142010,935266084,272217287,483191596,959809085,656209159,445364449,559703745,146471579,383484940,683791989,364355352,885953825,270390727,236711258,10549429,138303061,729822662,904524570,921984015,139473562,553980153,45643198,78906339,794772986,396298391,276573838,449063659,667639394,843047217,681456286,547997037,591809638,676176371,479710788,5127503,942990699,798219888,439226182,365980029,279665804,1716460,848350576,828891839,523558495,62373597,221459800,817664122,774639899,176028705,343242942,314777678,387019284,540410813,180248848,893077184,461124069,128760287,91488155,985018961,285182380,127724191,949407272,1501938,271876364,958166700,951550306,418317394,13567130,621586473,705891438,601555547,113656675,153356259,702630905,782764888,547730626,70585422,255675710,436868002,51212390,7042289,139712190,606302947,581930854,290908307,42116188,584618084,87454081,620504900,452006881},{15331614,393038906,720594444,338098878,862765246,23933379,354291542,879311153,578576944,788567829,627582444,971914913,646952672,304035044,310392835,268850926,463319514,805202450,646776158,749979542,658171035,404696360,190777410,597930909,748663289,419561966,852631723,944813118,989449903,146719665,13536077,961194208,411811474,965309558,981438703,719964338,494229514,963105431,586603021,628010471,710681029,154830112,247188779,469060132,345164112,698863078,36578121,215680036,925925853,398236663,23074190,22744984,897490778,893952352,576151947,632041010,35142832,692371655,208181447,268968882,928252060,868004559,60271984,694191459,709358129,817205263,621012023,450852778,950067258,678006690,585573438,340814814,623227659,45769939,691946478,843325804,611057982,612004772,531373561,177639792,683087559,254409372,45379568,3142384,904466086,466021801,733289326,609524094,844341263,443640135,291232028,101355703},{272758430,940838729,409278953,301198943,800056067,180818739,165340097,491597619,924381008,946814708,595932828,693733509,467726208,283138109,334489029,92146461,869310943,131713749,61220672,904192781,454321805,560533548,866833758,580083715,663955985,754820994,913488686,136625886,491543374,928249307,55076943,670048173,871243303,255619912,958409232,257809083,882882983,29781943,166355072,284433821,366731218,141655022,345908763,709449364,905330423,909854070,268123965,925100207,992850715,769480847,270807074,200476976,380779104,592060154,268634243,444924134,855211232,485298812,624417775,558675154,862193594,431263141,942655014,899201039,341839081,295218286,489050396,608584040,530478658,859560853,981385512,69474973,853744949,236539967,779785054,859184448,931939274,173137682,695236624,486705048,674250947,717626880,814561637,995443872,607599651,202832538,911162890,735477029,603375139,341463076,800478779,272827504,195535277},{29707257,107682206,744720583,559517522,541124102,358726768,970783011,624554190,629926040,413216792,930516475,783451966,293610910,86258790,243083651,435062585,179672245,327040014,738365479,235120831,435380573,700170091,720232707,297370040,429331160,899662324,692099910,336474659,987695774,553859557,663981581,482693927,190483579,389193445,60914037,446700189,431693021,439641244,743578642,637978802,164095717,901456729,882498143,3681662,923142460,737753491,463910269,812056846,470454512,673492637,771326181,359899701,41052616,920770620,274541863,220123807,984016204,119545232,476928525,325165397,711111250,229084832,785796217,937240514,158770083,124850120,951279146,474535903,937479994,225939908,706831401,941214901,559614777,25089729,844498433,235747152,705789267,833998255,447092470,351550073,496439973,499909810,648124496,521732818,76014011,973874294,772166729,874595474,443341837,362347181,300226570,120446279,200735718,755580870},{27795315,178544731,409301423,65201659,691470973,162056569,950761940,422568484,160420560,526190498,518068616,128788774,546769300,881689609,149485954,161800745,811457220,878857395,46350325,126061204,264992999,685579149,274928583,316182561,490977449,317264384,582469882,613160768,872712528,291714513,96031650,175343671,795632069,109150952,287454658,115181599,925650845,993681813,318177609,181011645,870176114,605144311,980475567,696397539,249944069,481201111,777774482,415988895,918680752,276579458,955599299,9546397,81823006,302814180,311708292,535612579,215314557,781184536,327448337,839944680,905642253,181293984,467004759,716902791,906624403,495039389,4947676,17359998,901792243,37237070,281262438,185246060,715678423,226154264,325320544,200504622,184621556,219457571,20432246,679313857,752819115,253486167,338044129,612653588,267422463,214656596,855972591,964487360,462938416,291473920,989350471,717942164,988619249,371899443,603125858},{992352239,102128532,358882119,664078638,817184088,691180446,82078665,17343623,215807620,576959397,439275238,945126780,761802341,42460471,554136278,768139112,998652750,335136551,507823458,606284790,935496024,146665088,342535566,952854247,302965043,278447013,11987522,588138061,436560939,827269134,228891374,918999388,903964537,878599805,752143837,990883813,984745774,812853434,728389675,400596134,629950307,248930130,765456409,220412575,625422505,535453910,817097461,18437827,731802795,456767947,716347581,53665043,127457169,978453571,948052125,877589648,746001358,42824924,351122186,532816479,788012726,605349985,155326433,356218249,71943652,883092911,958143625,130261340,598974696,324595650,287833656,311752254,469908465,793414731,625807483,132857149,779092170,691222960,877371373,528831260,399978913,200046446,625001515,631525572,797041899,95767756,992067450,8047818,260059736,451268215,922814704,797381796,159625680,543589663,532997455,943472898},{858227675,5868620,322234212,10744870,913254140,735754356,464494900,84138248,274096484,24056833,940725463,807993460,163683350,893653491,463956819,356314650,39361309,467671478,772808313,870970433,905214156,75226719,82844354,28612775,853428931,750404285,14916936,443805024,752386460,953040925,312638924,704702806,718922765,792070661,613121729,641793726,200867478,12540415,187002757,568309647,925171073,496167827,159479097,632125012,657223760,359420432,448961726,17577130,478415068,207165047,559661498,872665539,169490331,617003973,664640392,839962188,217992246,749990221,320657079,569477585,424781180,718280122,30303811,394101276,240690176,102647581,429478427,325114897,74497085,380513424,383577791,339581938,491435422,894482728,71287760,668105291,300838830,578535896,613045217,692478947,640847451,941517571,760896263,937204180,234683167,927825683,952171681,728186517,9608801,435299934,935576427,831280054,570004618,889585673,927642231,988875060,483436448},{463501751,116054939,835759820,505482869,540422645,432719298,178883826,109655001,901167799,717163779,321777127,281405113,269875979,255998636,987731936,122496202,853518385,787221981,782950531,209167413,49350139,874598047,676044334,896738540,573936471,533960054,437131231,116585374,238344936,82904728,624125665,720058349,903750227,160192292,366358253,972804897,293040521,628087908,536748617,199294189,482035822,398625678,110562988,555789435,70574181,967841468,507788432,453336414,334531774,77412816,200949921,757441760,639853422,48404999,348280197,466942372,738549619,425286061,438988462,866160409,551968415,869221098,661822671,211074033,384557094,550726032,952974683,691620078,453601975,746245639,105539259,251212666,513705623,214577628,171742940,178183188,934128058,486207769,910486146,519716060,640789047,171958846,819912325,552483728,443660705,575527626,11935661,870433193,245737315,272525179,442461385,62983634,708368832,124602454,2796210,705325160,497999074,536722284},{421096318,643512054,530331161,786206912,607922889,6106938,134467805,158591965,613707650,866726261,258185272,765639108,474590987,607924963,834476904,189937711,973597625,85032693,194697986,687073025,47757664,436575811,731780240,953942443,926742972,789122784,784471028,521929077,152886801,267770588,801786351,102500340,380304486,926907435,772038815,371957133,218443240,916885406,735479959,13613464,489247420,867502373,978013252,967908467,807358187,17368625,339879670,224279428,415515541,59823702,574111643,971344113,870367362,887544599,695127074,194300328,345844796,467813824,313138754,645490211,585238495,668073324,588892312,361744656,315136738,12299888,696323439,571556318,468562114,798723045,730398570,44914045,928079644,721334200,346827822,243968151,420547123,178325304,188421006,839661673,31172612,430667023,861275496,622080006,592949748,429260758,483230276,971746495,401428838,880854016,694071578,973819131,612570096,163823470,386131267,507705676,684203734,577549498,883521289},{830378275,816577859,870492238,224997430,839859539,882251684,702920086,972600338,157373646,291160959,860540527,349152907,392856032,638056070,843886901,56479999,509559454,44109160,607709182,614238365,215870094,420123544,723917621,235538241,209582528,355753399,219494557,223587408,662767102,930333296,209649620,621485825,125449769,647963674,786501732,754932984,451176765,195359788,40615120,102774677,785598942,546330097,15222304,638163428,941986740,670862897,683908958,518661399,222124665,751284560,339027876,308586313,187108948,204784258,647541601,54481229,637095135,781262873,218198081,766945868,803000470,238724424,552573972,239021770,467359390,439044641,145083696,71603024,949033566,594431734,61878518,845162787,303814496,200980193,730614084,122980735,370285642,752732752,36067139,168144284,446786468,866243522,392957615,58693422,672804736,522800672,618769848,269601411,784952773,534438292,716033038,384910448,16221504,589319608,367331568,90516470,320857711,939731149,844585764,900100930}};
int main(){
	int n,k;
	cin>>n>>k;
	cout<<ans[n-1][k-1]<<endl;
	return 0;
}

