1992G - Ultra-Meow - CodeForces Solution


combinatorics dp math number theory *2000

Please click on ads to support us..

Python Code:

n = int(input())
ans = [0, 4, 12, 31, 78, 184, 432, 977, 2210, 4876, 10776, 23390, 50876, 109152, 234688, 499141, 1063818, 2247268, 4756680, 9993890, 21036356, 44001904, 92198112, 192138186, 401053588, 833165464, 733439785, 591439591, 451314631, 402058007, 877857831, 757776614, 810520489, 645252787, 470374632, 96525971, 912528202, 666512366, 210929744, 599669154, 710958384, 162749437, 371979192, 45315191, 276551654, 308559856, 360804793, 837921035, 650582394, 551326373, 1614063, 141965317, 879775937, 774709371, 932799933, 770771982, 75068735, 619871554, 373842227, 936448202, 409292894, 629756827, 405099649, 41523114, 665390236, 869556586, 68489176, 241353536, 800211137, 625265094, 520546434, 315522103, 711109211, 475194852, 270649717, 435588769, 152217604, 819034419, 762229116, 841745576, 180132278, 235892077, 458348700, 681812885, 309883947, 179742650, 144518036, 660573862, 461278668, 283993404, 128510605, 139039719, 520174640, 995390014, 959160822, 308966214, 491455632, 272038766, 38170348, 562452551, 101276373, 881773700, 669032505, 709104617, 40149675, 517470400, 522702599, 960145085, 871337373, 737936693, 280062219, 682086356, 580928072, 454020523, 775062507, 794998092, 58082021, 927885647, 728114677, 450296006, 389965572, 627848775, 213191797, 557687962, 945352940, 23532520, 366973111, 941238103, 162108469, 106164188, 330857477, 483145526, 440407449, 567960917, 32387429, 987588290, 561038981, 480616009, 304681657, 942038007, 257874577, 275346577, 45887448, 944121736, 869020655, 666688883, 256486519, 907119062, 506673157, 989765704, 749271568, 90855431, 260671537, 296511057, 908864814, 80920617, 425212027, 488427436, 30338030, 607700128, 429332909, 451411391, 758553415, 12166702, 447255943, 419244083, 530178308, 314921342, 396603259, 244509486, 556061279, 15015531, 298200290, 181987401, 436651707, 562324568, 415356749, 557931947, 278694360, 608513817, 868349519, 671452326, 948192199, 755866715, 932883625, 348384794, 381370382, 667015593, 72434362, 842165730, 637944192, 135664672, 85780300, 893022864, 43849545, 604544466, 240304242, 909414777, 943690815, 123721382, 746887836, 643817494, 285415255, 608063701, 207248491, 250891579, 466267542, 188696165, 235329866, 984277984, 400306105, 830744212, 388489007, 483918178, 875838723, 176475382, 984960239, 454067742, 436173363, 386620378, 885392286, 331476940, 111559993, 501170923, 796766312, 921810304, 21318465, 956142946, 623077362, 522185937, 887537789, 761452008, 895567676, 973697195, 438049037, 871792288, 706203199, 108080085, 66634690, 622300176, 646498432, 6256820, 620105981, 659204524, 748778391, 882395288, 486267955, 969397080, 824703704, 881134804, 305907805, 283788101, 742129032, 951171364, 600554034, 353269467, 499384193, 51017358, 273415759, 106998953, 899522078, 1803027, 745702728, 267208970, 502804615, 548769443, 971085586, 160330265, 814847337, 336340480, 649428174, 228103099, 363195054, 747324067, 122603551, 199686853, 911195416, 920989832, 889266483, 202300728, 593748760, 448574139, 653737487, 929476971, 885310778, 1452009, 108331390, 63877983, 549465454, 595883046, 878604030, 857130847, 461613446, 55399452, 100205947, 631227947, 220084059, 189411197, 209335082, 267841040, 857732839, 919532128, 127267271, 872428897, 897669896, 647627636, 906503701, 110526347, 666046424, 218149831, 216274568, 211842146, 543583923, 461765090, 403128697, 601636512, 121667099, 947628840, 568834001, 847394134, 389093580, 279048284, 335317851, 273166025, 655217189, 292693460, 20927469, 922330423, 586823049, 472568132, 913785111, 187541395, 249678178, 667543149, 833467850, 343545857, 680617936, 296117545, 566339978, 457970855, 812361262, 545917992, 677514192, 679708214, 702129267, 315994464, 2840298, 670086323, 823578140, 591074461, 115770905, 378620028, 491728016, 957874394, 853700628, 931016194, 613839769, 276941743, 561113045, 27103918, 83126072, 270871390, 657415724, 437192787, 337077343, 776776242, 404319567, 547417274, 497902908, 895725448, 403724343, 824602540, 98298896, 582089078, 960553462, 218782914, 623067059, 781680602, 305366114, 943188631, 854396930, 671517433, 215113559, 384463362, 257241524, 404812449, 762884112, 567459715, 947956286, 215544063, 683235557, 198391991, 405373699, 640679567, 315717995, 4530633, 146496738, 879183366, 308108606, 309697469, 818362476, 315363032, 426596209, 912801216, 9083005, 793053246, 320028826, 473833270, 883355911, 516428345, 775614174, 263053605, 497137153, 258840957, 401801686, 55012547, 646504189, 142112583, 430141532, 338904023, 261473503, 418911073, 172483981, 388784506, 116216366, 953561738, 261712899, 477363022, 373083778, 330564173, 334559296, 573672184, 841068175, 261969143, 298833521, 179682467, 458945881, 440976487, 280276755, 146124645, 885544435, 229905350, 832991266, 347578644, 187879538, 699885109, 370659225, 807736963, 499029975, 697010722, 928245668, 372395559, 881688028, 407953133, 363493899, 242323534, 674997614, 643011756, 47425682, 351696460, 749001635, 196422361, 575279582, 325268198, 380275829, 647568964, 214095660, 812586759, 301004467, 826166031, 355655886, 386576564, 586448459, 228014571, 709210473, 266341233, 545407783, 530371763, 111644787, 428708251, 61021567, 479850041, 774120363, 441686221, 141053566, 605116296, 240957102, 593906044, 310710149, 888276332, 268144922, 854842938, 676054943, 409588216, 684652728, 730101261, 922107706, 146415550, 140451850, 113044225, 616571457, 715741049, 993414112, 179769769, 607267608, 830048373, 651009012, 391175571, 746000234, 321495963, 497588294, 753941820, 926269112, 258451626, 190445154, 163212463, 20592541, 707005389, 190681238, 221706485, 550094845, 642617317, 711962127, 519729086, 746368158, 481479577, 790599105, 207057955, 724675721, 451827919, 145895068, 454370462, 877697865, 203794359, 283416482, 212175965, 927662993, 886840124, 786924479, 658428301, 369833547, 449455474, 110818749, 875566862, 598764942, 240220249, 870965405, 702834170, 967767954, 53503805, 355406080, 19923327, 33440527, 403802958, 781981408, 292992899, 483487766, 249053297, 88114466, 753180318, 866392131, 618866339, 677858672, 109586725, 979677447, 86772058, 215560083, 495069142, 158202145, 920229789, 512715036, 570330234, 829682335, 199735281, 155558037, 10228142, 44806191, 387357603, 872114834, 655888792, 701376089, 207857747, 974109535, 47845722, 329267594, 12109736, 958524072, 473925114, 685068600, 722120752, 393114992, 86696812, 968887611, 965565057, 113106027, 390000287, 507904275, 381359735, 674334281, 800130723, 246720683, 232706766, 51250515, 641252316, 625852571, 433866758, 241125286, 832212520, 157992127, 152857196, 279982782, 39563653, 976200873, 922656284, 433606801, 980412567, 314002094, 606334704, 625377290, 915469671, 481770877, 489830418, 582987011, 658030894, 729366495, 701659738, 56538311, 446953434, 506782243, 378686589, 208874685, 879595877, 565197789, 344644001, 913312177, 837353742, 570804170, 374971071, 334328914, 809894728, 957336551, 730048070, 810284534, 583568392, 567890374, 527711535, 658437444, 12952350, 437962210, 784229623, 216689265, 576233644, 745387399, 542030915, 455742281, 343666389, 174054596, 850833236, 648553751, 669938717, 127426571, 886094266, 922385108, 960543907, 521874132, 872337085, 147819470, 803693418, 219968071, 887402385, 225129738, 406042115, 613384144, 634301794, 473803244, 439661968, 700122581, 170801822, 624798231, 897843682, 928465698, 655533336, 842180029, 121686617, 367826676, 47795157, 593404082, 953844681, 898944413, 646846624, 258713473, 36238548, 932558031, 329828500, 99980712, 330007985, 421310832, 482263372, 9706192, 606277801, 393273415, 188787957, 100447187, 106023815, 103532729, 952660340, 471261069, 947406119, 158573822, 32437512, 119921409, 577716551, 375618635, 558649902, 998041957, 658109999, 839188610, 360975274, 813825010, 927559836, 222617506, 124730070, 719451525, 869788823, 619543165, 661015077, 841892258, 916199576, 911847575, 179971437, 677736594, 591923949, 455022764, 991734313, 68168097, 476116121, 291030175, 253854268, 862900289, 20601531, 461970067, 712942959, 108953917, 797827659, 327927342, 345245563, 619579257, 348248423, 412849370, 5088388, 875586886, 567925783, 597491978, 348490510, 543542682, 861244234, 108735109, 713838785, 972664176, 438893643, 57733717, 203170454, 126126653, 813469906, 506082792, 348405837, 213383622, 180947833, 428183472, 344081321, 953313866, 43743632, 148092153, 941872482, 126164506, 93936403, 157551023, 937927299, 754567459, 782546634, 79944733, 167050541, 393506984, 475479940, 188583481, 255079391, 460653207, 191147337, 184272374, 979076178, 166063149, 254106582, 339856385, 896850802, 120274481, 94168194, 494627945, 619165766, 463497746, 842264670, 585194210, 110397560, 823454635, 617712854, 646063747, 220152977, 82858124, 780978077, 132164834, 732077049, 744988853, 937518035, 998375104, 287019007, 67394171, 500627253, 974679148, 75534779, 44768126, 628436571, 831667414, 610141106, 519459307, 710123601, 616955596, 775086120, 337005830, 953765458, 54865297, 460585593, 510508759, 522214757, 401779813, 999559205, 428519613, 802316761, 322238369, 304486923, 479393269, 657533804, 796745300, 436411844, 799534470, 587662787, 882168702, 450829045, 729030609, 934926824, 179343717, 623297032, 484554382, 766650464, 485142214, 800210237, 407785639, 678519073, 586498834, 336069471, 589981715, 991415278, 654201641, 898591901, 482668170, 838998293, 419934086, 891353483, 750456994, 264420079, 399840298, 546729350, 577459260, 365239843, 666481940, 544467585, 832944186, 998480205, 972996474, 226103210, 356350704, 339272092, 295121320, 740646405, 947601361, 750811265, 366856741, 620809712, 702556296, 354713593, 553174688, 817221965, 9433931, 324995522, 149951090, 796735872, 593311935, 732313376, 463987537, 776801678, 551046517, 55802255, 101377182, 740270873, 439632427, 682275524, 200913793, 440400737, 226252482, 747747266, 877298578, 10193015, 547602235, 690382696, 489630191, 174261424, 783982072, 930586708, 603010291, 851366790, 670081108, 574006856, 17403845, 994061528, 465683609, 3709119, 917660499, 624944692, 890858400, 734968533, 33813130, 264458700, 784421698, 821274298, 664565774, 423089750, 934248240, 678885864, 710046681, 388318339, 185736504, 397926898, 432253114, 729709896, 5017064, 134986580, 452362290, 23815327, 777187174, 843453858, 605133768, 682769020, 38442269, 958045236, 607707416, 209807062, 186081935, 575926517, 217724278, 383884872, 31254741, 719935340, 493810682, 485124913, 186009855, 936371496, 735783122, 974947644, 402055829, 483124720, 774891646, 677012239, 588593302, 93711299, 125697915, 756356302, 265813865, 567670957, 147746986, 239736563, 529093442, 833419513, 865320283, 130198859, 54322767, 26703959, 229108121, 504523619, 711848043, 953094648, 717392516, 531940349, 308693606, 20831121, 20913895, 266761901, 450530414, 815639835, 299306111, 661052714, 994211227, 16939309, 722301828, 252751627, 259196073, 711054029, 436879334, 490022013, 39129151, 778561594, 793463709, 536346525, 18055148, 246369106, 274186632, 292714330, 711222347, 909771075, 322716884, 505065203, 22829377, 860905100, 772606105, 644426524, 492036689, 217176136, 247086857, 247208356, 745355059, 299289088, 602331557, 654599822, 324213161, 21816828, 103687752, 430020653, 100257683, 522721721, 6308964, 97257674, 37977464, 698177236, 770202936, 787881582, 71157027, 752277447, 486130381, 33268868, 992839719, 818960633, 343129163, 106591267, 34014157, 995171883, 273670251, 300641656, 734589301, 243408462, 20040873, 197212877, 527321564, 251908422, 35400077, 606052563, 338438065, 948984253, 403300276, 125944976, 273217074, 638700845, 362710171, 742724796, 826683537, 530090301, 425116396, 48055033, 555853263, 454142975, 747258724, 123926114, 603743331, 575466013, 574496424, 560217094, 814691794, 82302667, 941635772, 62180809, 232483349, 120104546, 672696016, 723593719, 177135113, 30177057, 980144856, 70498316, 820159579, 651061565, 18774890, 128346335, 123299745, 318354728, 103137756, 707382988, 280479183, 3273827, 469400517, 363399470, 578210378, 658672555, 722990862, 414382995, 451349012, 236540765, 963413632, 241219524, 443767442, 264026770, 373367116, 223913319, 829080949, 688510938, 902039106, 746500894, 593070715, 676181415, 752638559, 780217859, 161538641, 656926155, 718264037, 659029709, 935706340, 348618810, 167825315, 616091442, 114533671, 834912823, 199228815, 988138364, 93889432, 710042646, 890536157, 732927627, 347658721, 808190616, 143595121, 491163464, 91182519, 924975169, 285372716, 481301317, 704292188, 539128455, 45015126, 729075121, 325183127, 344625542, 157382652, 973056101, 818638481, 527553774, 545212692, 794966859, 550354301, 175774683, 193231726, 546259335, 459248110, 999732386, 466382539, 807527766, 482726635, 839413087, 149510607, 64247326, 11232426, 278315116, 87581328, 818565505, 760935401, 736025580, 967268745, 346068698, 673007750, 755350258, 434181925, 465067619, 624060902, 318739455, 413181573, 377108192, 857027043, 644286617, 699815863, 659889217, 964748964, 597452807, 774787741, 342502533, 4533581, 215925913, 709965907, 918760088, 949976486, 483402188, 416629637, 196895209, 193091476, 917601506, 32407237, 290821418, 370459785, 350013377, 855294557, 75124774, 771320760, 666817561, 817919949, 124360880, 185861082, 661113457, 70784195, 445866611, 885962381, 631373202, 239663033, 725150959, 357968455, 119317974, 869302131, 291985099, 106634909, 770806146, 632271143, 170991774, 704618980, 57374667, 565291055, 233017165, 268201200, 487288725, 183244930, 115367122, 65404185, 577981028, 494641820, 852993030, 60705123, 451347144, 321570582, 805893819, 287292821, 187101564, 76223895, 306911212, 421905499, 374807402, 981947111, 239315455, 407960131, 940209912, 597736701, 748334749, 365937034, 894287095, 265644355, 784015535, 476311765, 539847515, 712817838, 408027615, 348546469, 621823110, 373611183, 863727551, 247314968, 203430164, 486299834, 727032534, 771823085, 755791978, 782616038, 52958043, 190044435, 437718453, 211950295, 747461245, 840976060, 680733180, 745680654, 269470439, 75798068, 285227508, 717883790, 259721490, 109158069, 9692013, 378244396, 723452078, 882345622, 411992338, 565750554, 713282453, 393628418, 781957669, 432169407, 387483759, 247983822, 928746965, 749559153, 102714397, 773689721, 217115000, 707273694, 624268130, 340711022, 278947815, 926594706, 810340753, 95477789, 3574151, 906333483, 500482152, 597705000, 253261710, 893486218, 802907585, 153666341, 677833726, 547072171, 890709040, 547036970, 808873386, 680222360, 217014262, 683930904, 183017532, 365644577, 341775159, 681988370, 402123664, 797999536, 309066676, 593142184, 701883700, 303802721, 765037630, 130216565, 381666976, 163899207, 844072176, 290405379, 951375693, 311795522, 392280389, 420737364, 883807058, 312320460, 856354510, 891534431, 294317888, 303937441, 176909184, 215025035, 599192317, 643211302, 643713561, 66733801, 614322122, 345870988, 635065917, 739038831, 241901787, 359431576, 940400337, 383312675, 205747406, 421542858, 930195551, 900583279, 785167742, 731104213, 563575059, 770225055, 96573010, 765445782, 988841282, 266881584, 477318793, 111433708, 409202041, 445588591, 411985172, 332708387, 768534967, 572022113, 517227719, 174264175, 291858570, 142952109, 651965144, 540870171, 474386667, 896532887, 382050683, 555139578, 35328890, 234810635, 878795309, 414202024, 930389704, 487225060, 461533784, 428850211, 431601627, 886333840, 730860144, 554242625, 785154150, 940397669, 862999792, 206357067, 829833469, 581096905, 967529854, 620779597, 212572037, 168023665, 730153275, 431824914, 530869923, 947813330, 150878793, 846051529, 448735248, 74646247, 797004236, 302711490, 27788419, 890388952, 866384223, 72016867, 60444806, 477883345, 715216533, 858407984, 308043195, 327986076, 780357788, 408314320, 512437699, 415270402, 522717878, 607015786, 98481104, 443282342, 737795868, 460872258, 273253059, 487628234, 659233796, 82956049, 100400655, 258755173, 29127953, 290071358, 472351887, 871965575, 188635924, 86319052, 217520621, 271230065, 235153491, 815062281, 965099593, 309220361, 764973744, 46032223, 740147467, 544633909, 81277866, 419911660, 673532983, 376489664, 400494680, 918684180, 882995749, 236770764, 718946418, 321009935, 139204094, 810876619, 566138560, 262150823, 445191086, 409877005, 709288923, 496557185, 449349271, 210615919, 273307619, 794284767, 619235631, 229149364, 808871089, 580454607, 78099845, 7049434, 966554724, 336508417, 614903347, 843402612, 840441255, 135266182, 583469302, 984473334, 960624923, 191388759, 22953365, 126462431, 379675953, 81574703, 54816984, 398525177, 563269495, 282103812, 405395242, 433049793, 472723972, 434485187, 919645198, 795439375, 888938469, 602472875, 466833056, 232049888, 846309217, 886153552, 873639825, 521420136, 750853676, 598269324, 690152924, 766553757, 721089702, 987171054, 94481290, 368929194, 365855118, 451576685, 620981153, 121428102, 466174700, 450212612, 64992639, 201438140, 565833997, 417479435, 729100981, 601447740, 744170939, 61325004, 427052805, 146038149, 596659012, 361048194, 539458964, 749838629, 948725384, 581133572, 771151868, 277034980, 514096360, 967117731, 660529508, 76759053, 456351202, 935502587, 914685870, 920572465, 341121572, 47046065, 778711429, 16634549, 955087588, 747021975, 868403896, 84195009, 500787627, 391124164, 904002904, 366201455, 734272777, 701328177, 321319830, 573770173, 194676317, 113874686, 356442245, 610972705, 469039324, 530431508, 23106357, 415624168, 7449739, 492545287, 514870894, 940325010, 352830925, 347994738, 641868020, 853067599, 682188676, 641703595, 99589345, 308483683, 969467404, 376154766, 617737794, 984355462, 924899804, 845319104, 161644051, 305366114, 674311402, 276934845, 132860996, 978970191, 173444343, 199881461, 432283652, 276538404, 889146044, 426176495, 344781181, 281100025, 663255183, 692661025, 552136083, 568874816, 995744659, 849899925, 766750412, 967143280, 752412973, 239395777, 399087134, 736453627, 265579425, 284276286, 870737900, 753945544, 238156551, 526192106, 405475149, 10466307, 438159469, 674382995, 117818729, 427893693, 355573809, 480172551, 838852087, 753803906, 653270252, 610939453, 52009409, 321614635, 584062006, 38507266, 156886389, 795305829, 985858162, 897848507, 982429431, 669387615, 462635403, 743385853, 133451870, 539363935, 730110038, 550060842, 277981911, 915326914, 221366120, 880184601, 812166440, 374142303, 568889039, 137015798, 56193778, 109338464, 242461826, 472727284, 633103127, 217420775, 634988422, 74834949, 423514011, 66460470, 414774866, 707279545, 557966900, 626853052, 305955511, 655588044, 692622814, 559953709, 239823939, 178480223, 519925360, 835180107, 519212566, 219742680, 817861367, 360992940, 104767341, 110615541, 431216115, 466755666, 91865003, 601023764, 290475423, 250125864, 37158040, 751016166, 59946736, 826693802, 766669903, 360541098, 856411230, 21627649, 132698624, 500618053, 193196350, 327275913, 13701678, 790936215, 510141431, 74414270, 867244260, 951014173, 661643979, 189390584, 290346169, 45102870, 775288179, 408218493, 786642272, 3853105, 633530688, 989335662, 577581227, 44259598, 257329953, 71048510, 537649827, 300854077, 13749026, 929715772, 153492900, 915856659, 791560281, 18603970, 851213662, 444360991, 900530769, 768796234, 211436926, 293812664, 456141133, 396037514, 145154157, 225329320, 602088564, 944261152, 848620844, 657577784, 22629366, 886603151, 464089746, 293557140, 793934156, 49378911, 242326379, 330695196, 709449907, 803069566, 146702906, 830084841, 819060786, 784837667, 478568952, 544002305, 455318743, 258095097, 96083824, 581998113, 282777995, 124877836, 778480422, 794248235, 512390884, 973931353, 895029598, 586657529, 422739356, 31872072, 402246794, 550067049, 347170201, 676634253, 393224435, 715624274, 457281369, 631264354, 425621435, 718049341, 968741742, 404709361, 975040305, 818984153, 411819565, 299253330, 741649431, 385755669, 967016085, 543859419, 679603771, 798516573, 539035324, 835306786, 612726561, 254397674, 667660684, 451099597, 723658208, 910429353, 360605352, 573662466, 564259837, 538326722, 144109650, 927447513, 196120018, 949152874, 770665033, 768981397, 865591429, 641788196, 128783843, 899989073, 616611203, 802907933, 719455327, 717652769, 671136214, 457240902, 612401056, 684676029, 430178077, 699851836, 420310272, 198603272, 153091919, 738114771, 986659775, 701043261, 981738016, 874370904, 684584445, 12748399, 855690870, 285699804, 599465163, 496202617, 958035078, 105159327, 672397647, 101152020, 910290614, 846008160, 352237254, 806182264, 455709793, 318250603, 529702182, 686728446, 153613866, 816524074, 686305742, 409796831, 932029481, 12800364, 957855903, 510677456, 233281933, 846426508, 358390122, 236230798, 842904966, 763612155, 351062855, 13334623, 691680354, 628196374, 782832914, 545008506, 696526486, 310423705, 210527868, 90538696, 166694017, 11319881, 449009596, 609746587, 655315666, 157540912, 176342735, 740323825, 312927629, 176408664, 732171472, 666556575, 414065227, 636984999, 797025686, 829469552, 126937089, 195546919, 85231059, 937153089, 923591178, 913946212, 778488556, 824032557, 859650787, 787523368, 69798410, 412484024, 625947001, 343442804, 928808614, 223812450, 397453861, 259688652, 789515731, 438155189, 672950007, 782394950, 485408662, 716797082, 3536111, 990991268, 798695048, 533066245, 900191384, 543087385, 256727104, 484272711, 349126329, 581526670, 649978596, 833053240, 60787329, 253958864, 799966646, 129470102, 661110085, 440367445, 544659309, 561907739, 105313466, 100983430, 680607770, 922641532, 877835657, 1375282, 318888714, 620593349, 925317644, 781898965, 636131921, 997318578, 557520100, 15259144, 490291560, 581458924, 593845391, 591194005, 337819047, 289651000, 671388536, 798828703, 86050358, 996307261, 356443807, 9713766, 910107761, 7520137, 319013398, 387245305, 311413405, 619700853, 398770643, 785037458, 51221222, 52427132, 852513189, 504965123, 200978840, 601712695, 250559703, 300139459, 364564633, 925209485, 307029944, 398380757, 658948635, 455180746, 691514897, 932163719, 715898657, 628333021, 276561707, 339266263, 139635969, 423843341, 941536050, 461357698, 407770343, 128683113, 546943541, 346456804, 673428461, 357135824, 53250703, 147617042, 242199607, 648861758, 390409682, 438669533, 591044466, 813489615, 376026747, 277656233, 556027351, 214465665, 645945774, 701535421, 656430639, 951436784, 807423089, 169148202, 86248798, 389705734, 696791753, 262416044, 779109003, 33548179, 658142362, 217605451, 637368515, 880019966, 539589121, 500309993, 982799896, 650126803, 996146610, 730401292, 111897460, 176227243, 919184297, 648097879, 271351077, 781619329, 91414155, 138497003, 777443412, 377561589, 895369527, 81438135, 630742676, 424281718, 916304626, 483794730, 521111579, 646965105, 677861451, 774690697, 463046751, 601964696, 342038120, 387561023, 914123356, 642185844, 20508837, 296774237, 717227567, 457481372, 873170683, 838446339, 196717449, 761854818, 146414401, 766508475, 338944686, 572608050, 887726804, 354328313, 907249550, 129997948, 997089387, 256174201, 799505858, 646993466, 875895407, 943717835, 21520813, 810749738, 986985521, 44803455, 540684754, 364699209, 358252883, 849824591, 648551268, 830377829, 557496299, 248093777, 64442066, 661288876, 639597554, 408814063, 188263589, 895003026, 264529138, 602961654, 404725124, 105063753, 377263437, 936980915, 822837570, 375491290, 301192880, 521650395, 578473575, 834005690, 586892398, 882018963, 554587613, 942111901, 809048847, 949844394, 283877477, 894741775, 895324103, 98595469, 334908848, 901606797, 190117302, 307391001, 204393063, 117411714, 442560170, 719622699, 748983283, 835976002, 477309499, 306656756, 369434335, 147019716, 745431521, 123467233, 962650072, 455716936, 624001411, 369670025, 911701610, 310072046, 195480009, 337635364, 261655510, 310012404, 958614805, 64035139, 309583714, 206389593, 919260801, 187410262, 605224473, 606003628, 115064342, 812347433, 688393669, 705662313, 376750514, 69000942, 108991502, 479982681, 369871887, 787742475, 21307216, 234609236, 612285740, 992550689, 951851537, 975619910, 303395426, 894458224, 8903927, 168477335, 58711098, 720100120, 578472622, 567656919, 79715176, 802277073, 107903449, 787193768, 324996631, 935540728, 30845343, 203880543, 858436311, 285632036, 909850753, 94739190, 579797311, 259745400, 148208602, 697020344, 742930828, 88274195, 105215953, 620082104, 699591025, 37782821, 279136454, 112676027, 731401920, 680416323, 662538501, 195526948, 44820623, 571441065, 758560840, 444320935, 795947625, 300692291, 564877537, 964943273, 509043650, 358840096, 730877364, 824765926, 267608197, 987261207, 528051082, 864281402, 687375749, 607468450, 284884965, 500637759, 967087541, 657646391, 114098280, 122081831, 869557265, 314655607, 744542869, 791250081, 289198652, 787054697, 522762689, 880154943, 335424971, 9368202, 552888561, 459850176, 464898145, 346088520, 192442821, 50054576, 173339481, 7354705, 264647759, 171998497, 204713057, 980238044, 893929334, 71106360, 292417714, 717826245, 361265419, 254494099, 465308455, 58469961, 817093108, 145598434, 863450589, 772550085, 847068926, 876733501, 417566280, 565515177, 324698163, 570926801, 439576363, 565274626, 95621315, 935730244, 409467404, 796885243, 409413844, 730629428, 658854812, 964916584, 931030676, 450889192, 29264006, 413839414, 803026854, 27299295, 125535154, 936052705, 180171724, 100273015, 281228366, 522175007, 116408771, 71690642, 591596566, 538685532, 509326841, 440623296, 282022361, 251923192, 506814057, 765142001, 231946637, 469948829, 154614119, 333450458, 525138378, 147165629, 770519916, 928595345, 869292920, 288807899, 611976383, 424841037, 606252452, 16058002, 874860548, 963933516, 766815397, 390480488, 354501205, 136401214, 235551263, 180697756, 299396565, 437174057, 936612620, 226748941, 575031853, 564158552, 140843331, 938066067, 120101065, 865719736, 95127119, 692324648, 215654095, 439589816, 805279484, 643685465, 405418596, 943343208, 806240818, 142505686, 156956148, 434008538, 203166117, 886717202, 820227450, 561994751, 533758960, 753677352, 876413933, 497465594, 92797568, 164146083, 145375230, 204954248, 283242016, 223299184, 767057632, 161375872, 787887105, 84816670, 51952819, 140075520, 778964158, 702607837, 806476050, 191670198, 772040670, 858953767, 936997436, 133484587, 353406624, 744772157, 518400989, 188637607, 249339158, 106020853, 493678144, 416726443, 800450972, 318382571, 272936719, 415795981, 255011245, 989712669, 228526170, 375813042, 598525255, 872093318, 760131404, 220434040, 773014737, 346714430, 335025326, 872790511, 544221993, 899403415, 639542610, 522922936, 527813355, 30977588, 324033159, 549469858, 365600261, 336814682, 517479365, 457415377, 157948108, 5722818, 907319748, 573945904, 614793613, 266812886, 50386631, 249675930, 760722047, 117054752, 767564144, 917570955, 51589451, 632949591, 771468362, 662019459, 208954003, 894238974, 834469417, 574262685, 348698869, 318693170, 356754213, 198690161, 946285181, 833297309, 708770550, 180448909, 337905639, 727442549, 453703110, 113931297, 643135973, 112372268, 289819505, 884040333, 24400798, 266406881, 288165755, 446752643, 904822581, 291329687, 320020259, 566778660, 446931909, 600816386, 866810757, 561431786, 518545582, 348332280, 579264762, 403494002, 358925521, 697708975, 281597402, 482626536, 425680616, 529088160, 920292270, 551492252, 886830248, 617291372, 196873873, 768271285, 410216433, 318527008, 412075092, 816526766, 263438893, 496384114, 770863269, 419751843, 166481567, 845064389, 512371417, 73147833, 616567377, 426754771, 836486047, 447452176, 460886249, 19692854, 210842617, 813366686, 44275798, 655277397, 81649999, 430203188, 749838262, 567289270, 160264031, 590979074, 955867811, 993539656, 230254842, 787725848, 560352428, 429569498, 630372821, 496204224, 608492730, 158819802, 883646537, 534630463, 552936458, 175222500, 682902267, 643202891, 751195368, 611984178, 250166773, 938707342, 603286772, 960068714, 214139737, 442260161, 255177139, 566277026, 9686122, 243063236, 816578848, 527921650, 447187537, 473430918, 729108067, 774439517, 13926901, 292747355, 139153017, 337880239, 132648333, 503593486, 942853060, 838893386, 410499443, 633747978, 173972283, 598940941, 565325294, 134636074, 519206097, 54354159, 263249023, 590265934, 412396575, 79864695, 588938344, 198162882, 285053283, 651251370, 782637653, 889854515, 374587616, 47492082, 141149185, 475565791, 492301243, 757672163, 604141769, 300562246, 209334654, 787784168, 242657571, 961774575, 601674267, 109186245, 80651031, 784652941, 911401583, 316206654, 745078304, 463770595, 60011870, 14479716, 160759319, 899342549, 593474654, 498244931, 469413768, 184010042, 942894549, 866519136, 314102569, 551125318, 561048509, 813777738, 890305375, 547333630, 561468659, 189828866, 117881345, 503328910, 940255309, 950775484, 264794378, 810648248, 306737326, 737712613, 488407344, 473766525, 102230953, 192269268, 640057942, 231345325, 457723394, 720364580, 361527467, 942726109, 501174195, 881033083, 533323056, 581384884, 933290353, 925535801, 542180113, 320180627, 572833921, 88949460, 208382124, 189890748, 458486424, 9478848, 96522895, 563069818, 792201075, 64498241, 353231714, 626847834, 244409242, 170356108, 69439857, 865030224, 351945245, 608492509, 297664017, 213736110, 21238904, 516110126, 199044166, 292617590, 298710124, 175537280, 850377258, 13222644, 17604470, 285081501, 713241480, 425973190, 277779136, 553519220, 708145175, 408134135, 781362125, 530099411, 475820156, 821140984, 955749460, 389501601, 368223006, 648456778, 730467335, 108977727, 482646706, 557465675, 938467918, 245624888, 516513951, 507784152, 863880330, 626785667, 530855423, 657810902, 250992340, 886384918, 307150649, 151902236, 484004600, 118412959, 739738436, 81091922, 662462125, 731384485, 384185992, 394212938, 728530518, 960424859, 869028962, 751513223, 509071639, 71964495, 149882486, 515049868, 575264091, 11667752, 111958933, 668476181, 683831288, 145895815, 602592218, 318117420, 212636632, 877005228, 136186322, 79300486, 560019237, 347749842, 132912230, 176669953, 280155111, 203692194, 833013695, 239555278, 755516399, 805144385, 426326021, 29098404, 538557225, 782899919, 22911867, 868965624, 471734697, 236036926, 102753299, 375776747, 345921954, 372924497, 739867086, 204056528, 283906053, 465101565, 792265083, 173687995, 886164934, 128961212, 513058222, 452641862, 150182252, 6466190, 374106111, 572618973, 898388413, 94403823, 498143848, 186795726, 287357799, 336747739, 700792041, 449712646, 134787482, 462089248, 239658943, 249375015, 288163312, 656555147, 375220495, 71355075, 189777012, 663210385, 908520199, 951665828, 498037257, 534576255, 764464743, 682936457, 59475001, 734977914, 728667282, 921446191, 314776054, 485998630, 58143624, 542073343, 77468694, 858081761, 898061828, 608701120, 76225429, 402760749, 52538287, 106316131, 268415474, 541789176, 851053595, 721940095, 484189637, 47710915, 239217820, 795762232, 579005351, 427317056, 394187282, 865600001, 52510547, 413922842, 143729553, 523066091, 733221511, 408870948, 237287251, 244286234, 200920259, 480687453, 574296153, 463980039, 559389046, 380329038, 146983570, 340170945, 609911944, 404639101, 271770884, 282802641, 692942273, 342928038, 155222588, 138619172, 202984972, 718665935, 671275322, 593334594, 609556805, 222249424, 774139713, 560822703, 993886952, 37947026, 232678823, 666050190, 359274718, 521319605, 217824094, 646728871, 18212534, 880747800, 76746060, 530783027, 424303870, 357771354, 722622242, 481898947, 939712289, 26042444, 31114512, 648700544, 976945098, 299776248, 923830630, 231205503, 336601305, 207379624, 584659783, 306027629, 659682791, 866197855, 348402292, 884133690, 602811575, 954939567, 563549645, 124364958, 702286276, 393635245, 485668248, 927587296, 899843029, 624689251, 569611640, 439236080, 267367068, 734785357, 523920357, 848045591, 172572170, 545963855, 291395361, 386068775, 264301005, 741714229, 677060930, 206570722, 908877073, 227549615, 818066225, 275314361, 483252699, 523233077, 497125718, 221162159, 845413871, 598470648, 3427693, 637427045, 469354182, 460994979, 970358221, 29862902, 534861481, 426308851, 91974330, 610292237, 282219438, 269813170, 181884796, 185266775, 816905554, 919799840, 221883120, 587721189, 276520061, 128859911, 778418089, 860115341, 920966988, 55050635, 204176859, 260820403, 22630632, 455128011, 824130080, 287727127, 434443234, 426754371, 217933307, 667338240, 115065047, 156016591, 847003795, 397553571, 624893241, 63970434, 779295412, 815326660, 135603129, 298149623, 304169802, 716113064, 836838624, 104771074, 5026483, 734428319, 284769964, 467041319, 629208323, 848422210, 437847017, 235716297, 9506529, 459102131, 791598775, 343553821, 828621239, 698667590, 282020318, 729741112, 559271807, 781345511, 549610744, 750429083, 327586017, 260002421, 892248504, 203818556, 457515900, 592318034, 972084513, 653313962, 632041089, 100661950, 609662816, 565644748, 663724300, 712725078, 661734979, 864575884, 186522931, 537469580, 579061965, 815818795, 515218350, 661216167, 773296663, 69711194, 815716695, 723904897, 885472126, 140830294, 159168685, 797881587, 399188935, 716554724, 881188939, 435085287, 284673221, 260176113, 99799882, 962918462, 691097604, 435469972, 320372588, 853844260, 361408316, 575212961, 84819651, 579224625, 24681544, 687704373, 275982489, 105330097, 130054417, 473569324, 783179411, 420200768, 275216878, 965801575, 544409212, 750289686, 549970186, 745825427, 755268477, 94077174, 166583539, 667328000, 233468523, 803580727, 123673431, 593921579, 535289566, 456877986, 794127046, 133449515, 342939039, 866659812, 340254425, 403635779, 800482973, 493473662, 84009489, 738049877, 121249936, 522623454, 780330998, 681156310, 853073724, 188124718, 264204215, 456317552, 702414189, 116464859, 853028173, 552602298, 657658321, 701500478, 912277870, 369291091, 286132737, 751206920, 400350879, 516467535, 230701026, 324465167, 782147927, 16548307, 634121513, 77252873, 59928971, 355897365, 686941591, 318040860, 25816912, 828264571, 148257300, 403037567, 279843082, 985778032, 392321119, 489009696, 279561530, 376592899, 105476653, 480832669, 610357261, 300231960, 521377046, 360823865, 538821860, 349922826, 206326558, 501769561, 85292463, 527050706, 12096923, 450056959, 431385102, 566222642, 65289673, 944389112, 809743330, 874725696, 181055687, 383067539, 687112530, 458049713, 954303112, 243904850, 325327660, 991849873, 592467531, 549713260, 708277519, 875667844, 520525935, 877503108, 213567639, 772940237, 72446401, 528112631, 524818061, 582515424, 408713478, 948944178, 296201027, 118470935, 939657713, 983590957, 543508953, 504120051, 579072352, 826553298, 522229150, 718092683, 443947242, 582432023, 33727261, 845604692, 140427609, 393455877, 253826849, 958056334, 451797147, 705204824, 835886505, 878215130, 942162873, 710094240, 149446003, 601966017, 615839593, 443975216, 592118941, 33422016, 827387427, 51511411, 53696620, 694339517, 668774638, 685334363, 380001047, 151142456, 220596657, 5754776, 714463961, 687173777, 833291930, 699567294, 718344903, 568623563, 78109937, 683954930, 277192076, 665324362, 389593044, 222946921, 608565280, 992173906, 361007023, 822187437, 321658183, 44009923, 34707496, 672189241, 979637419, 370371806, 736893723, 118175353, 437832377, 453216417, 789290106, 888786871, 981954000, 204734643, 424684703, 812676027, 407823405, 668873294, 473797791, 360501518, 813013874, 277651499, 326410456, 259315951, 233399823, 892779816, 708597659, 121115977, 610661854, 37006372, 995345033, 253420743, 967907043, 986736836, 366253360, 936197748, 682246479, 179257056, 477224202, 213504824, 342517575, 721260851, 208423308, 561749420, 600345226, 780301661, 574436173, 467317189, 779029816, 831839018, 4755648, 104628861, 275522712, 931515684, 986920504, 495722027, 140843683, 369211484, 668463976, 687024417, 736919235, 874224344, 854864526, 311272555, 756750707, 919675461, 219717411, 64131024, 764042447, 26869702, 325818878, 646777030, 106826988, 194211072, 159678823, 241586030, 133982610, 956878763, 17049955, 789754068, 574966186, 172548976, 922604406, 935675249, 39284194, 440434164, 251333454, 950130005, 801235471, 392323309, 966608428, 92626345, 538765901, 715169807, 144450713, 839453460, 777673239, 757554593, 421182341, 651197163, 632784105, 500898134, 383028191, 707376099, 495798962, 756876792, 846888091, 754891654, 343501132, 931464180, 697929266, 373706182, 42203529, 995797693, 403215229, 451992970, 668818150, 919886355, 362578249, 54156725, 657185415, 630371752, 995452500, 254908695, 372496635, 801008099, 167312882, 558685080, 798631530, 493500310, 693916518, 972782064, 17764846, 375325818, 576697383, 512579256, 316426747, 69591468, 511318525, 769588960, 514655278, 17118196, 908877307, 768985195, 87838549, 980599457, 803397012, 826483432, 674679903, 228117452, 668224753, 851480118, 466431816, 992986094, 359745586, 959981020, 863792523, 689544424, 495582596, 839002732, 981230424, 353811001, 139148275, 843697211, 726937743, 715478109, 5105703, 56621919, 312471767, 810585586, 633702490, 9973174, 590993245, 152259294, 82173525, 45438294, 831193171, 186751311, 193735408, 484930734, 51530301, 492900274, 486534702, 532428078, 59929540, 357293790, 848165201, 646069228, 155042170, 109039672, 549724073, 295269474, 24288838, 831863016, 194356067, 521853473, 166293784, 865152924, 378088331, 886438072, 962538824, 446123274, 443454953, 971092452, 232441962, 801614108, 418748255, 184417232, 147115833, 681914575, 590506992, 731745606, 997179812, 197286112, 204126257, 219958515, 710419796, 667663596, 206601486, 400499009, 474770412, 898724972, 61043373, 918823345, 969742926, 126432213, 795287260, 338360006, 745727660, 482597292, 527367947, 19303803, 364210118, 586691900, 475314058, 383714772, 656513015, 45372661, 851843499, 633073550, 742400785, 202347799, 428610207, 727405365, 343526466, 167792736, 720877976, 364715175, 760044684, 211926281, 241012072, 249371831, 310464426, 690319607, 414094587, 105752187, 531213328, 172678722, 89768218, 620544728, 345145532, 454324218, 114787585, 285707793, 154914440, 534359372, 963999253, 826120460, 159339387, 911166625, 207922878, 785797146, 230525882, 940857317, 854931366, 629084923, 527902591, 732693974, 366402545, 440360265, 739301376, 308823452, 119648298, 560179431, 604552879, 492637084, 512476470, 159078258, 331672243, 199845779, 233418587, 612842360, 629785106, 843590949, 554840047, 445763049, 577196973, 498725780, 718713158, 814753666, 498993965, 507297344, 362705318, 762648306, 311309737, 771570154, 459784795, 515372303, 640308483, 663827825, 545978672, 624800794, 964503691, 60381182, 120991981, 767479218, 397096359, 896173728, 260279233, 928482506, 844562402, 320820943, 951943937, 430672458, 252566037, 612270452, 520951138, 470455781, 519930701, 754075436, 79926513, 16709169, 904797718, 237020001, 935823772, 581345839, 64332164, 967457550, 467020893, 289214646, 813000636, 46692719, 315725359, 314216548, 498569345, 728202017, 871382573, 667018454, 475570110, 648153480, 311575382, 411203811, 616278861, 384769910, 154118009, 917084798, 825235518, 85866128, 129700422, 981254, 207931742, 382185131, 356745237, 578777062, 451172633, 363491618, 958505842, 761597099, 28529546, 435400787, 380787372, 274941510, 40865500, 135198078, 748567270, 711002845, 524871122, 905215485, 873422929, 168738815, 675741382, 39054627, 844507027, 439301534, 74395210, 149940375, 630794310, 266188433, 62225713, 142850706, 147562630, 368722380, 585453244, 465294961, 131653987, 440861887, 857820738, 425857114, 387756834, 616376255, 72752375, 508955105, 974401767, 402604933, 582587979, 980381596, 979916585, 220655715, 735369389, 514029000, 837934934, 849030777, 330881766, 354407189, 861105569, 492785766, 489024997, 60348534, 829494873, 988183927, 91746915, 500270575, 959428296, 185963551, 608570355, 285568588, 311292442, 896296424, 790777555, 676401256, 344785461, 68955527, 223697320, 964933081, 370438909, 811031568, 263421226, 807457452, 442087991, 6635968, 916638596, 323117150, 228301057, 415961988, 352328387, 542096270, 560132697, 470023378, 220266848, 839565653, 785122757, 166373321, 422128580, 228768423, 573724868, 685494802, 841029366, 834239003, 488370278, 585461661, 652861047, 740606521, 781538205, 302614125, 521691838, 1534564, 252629696, 337862972, 144061133, 618536593, 328264347, 978185995, 258720766, 804070729, 789867115, 726251004, 597325070, 780717257, 301828880, 947926242, 717229337, 811532588, 644128253, 796552176, 377731876, 788646446, 358456420, 849643616, 968661944, 468246978, 825928572, 775549539, 423297157, 341363915, 727175775, 433429961, 392611716, 701537104, 244823890, 154902468, 946607266, 554233284, 811678430, 267431896, 985810159, 547920490, 547752777, 400706277, 226566494, 673935901, 581357355, 45926348, 122339511, 777525609, 186434989, 504256312, 882272193, 290089708, 14663856, 131509042, 720617089, 849959491, 603993257, 842887780, 783764873, 107134810, 682018399, 522457089, 814950967, 263583112, 472019881, 478764509, 711829999, 562558993, 51349920, 658295848, 21387403, 265158824, 794428895, 478393848, 479580410, 517305080, 420093355, 72763757, 1806437, 933921090, 719547811, 160328451, 376988062, 638907475, 36994408, 613714227, 227163920, 613229470, 767775177, 171156860, 36276907, 614979880, 710450513, 590605269, 102344468, 883505936, 951433242, 618134456, 126140539, 113353001, 88865455, 622018609, 837233213, 451617201, 884361214, 877325556, 640591866, 715596265, 200889524, 139429194, 103182444, 156965479, 819776031, 441954419, 132668922, 474947307, 437328403, 713094651, 665579940, 684911260, 984380660, 383766847, 774703871, 209429885, 307386404, 254861415, 173527661, 907409764, 752331137, 746080021, 199865272, 365401553, 651189037, 165062103, 156573578, 763883307, 117716421, 38377432, 592053538, 395885436, 981360232, 809833918, 162785384, 714024619, 126861466, 807538329, 757820029, 730901625, 627832006, 116710294, 73213443, 590612049, 865204501, 507149633, 154042976, 415048511, 325366425, 78583079, 924573614, 560548151, 494895694, 835395115, 174393532, 731201979, 329199788, 188059222, 10533837, 139706272, 224938288, 924430968, 30761842, 959741245, 190212143, 973294509, 892066852, 155614568, 736483112, 958889722, 713702360, 371098719, 443714252, 662204528, 935546361, 970196818, 456060261, 308536927, 964042779, 513751185, 947378568, 237419672, 417619099, 205888384, 947171718, 376944187, 233692778, 397788602, 193505668, 108623520, 266932652, 420314047, 561536988, 668868948, 609201315, 401582525, 28249659, 789218926, 829335225, 589548854, 349408826, 422331296, 914662021, 723378618, 375834903, 327888138, 805294863, 915463061, 40852419, 301198199, 326164092, 530301621, 535714491, 583322730, 773889521, 595354041, 243748736, 677797496, 225448127, 212096343, 929666351, 904133058, 489367943, 157937331, 809544154, 335894102, 937803099, 742829402, 586142076, 641176996, 180989827, 237551044, 227710273, 957706113, 511154763, 31451773, 230363329, 497295674, 514369202, 175014461, 315561065, 216226379, 301379568, 943176146, 339261932, 40191890, 513436284, 473544686, 6355859, 799400211, 458165181, 63084306, 146758186, 880532176, 734054738, 816172671, 423298912, 238850618, 689959731, 948930652, 651934223, 579913213, 134104499, 372388087, 886376065, 189468472, 596190716, 859246842, 854603922, 376669484, 320308040, 310462675, 703961281, 87308942, 942811415, 603168378, 529876959, 929936145, 288793550, 58316008, 15180182, 953276017, 378103315, 447869214, 383465204, 533580751, 935915053, 938431478, 205169274, 676744064, 359024081, 783670219, 348073332, 958634892, 848741018, 747434934, 825591131, 850993875, 60744113, 920734706, 571780035, 340545962, 718100598, 224144778, 899209936, 950194228, 20935489, 648968430, 852497494, 133384768, 451262865, 616084892, 136480572, 127197799, 753511720, 923970060, 975265553, 618317593, 593342266, 857830515, 179132686, 42849311, 368939413, 476214589, 774005677, 501354406, 828374715, 470121659, 615409263, 484307470, 27038630, 68033057, 881141641, 818106463, 155509575, 534311902, 643183508, 179538010, 678515479, 929714962, 314487908, 919711846, 877030163, 917004432, 745980891, 143738220, 880616170, 368338120, 721925246, 872273647, 383831376, 481355386, 137522586, 129815715, 243175419, 905433017, 502734816, 681798334, 448409089, 602132993, 301739332, 424737931, 216172236, 717381547, 981393739, 102935757, 704950628, 970494421, 972265059, 186902778, 707922992, 385336666, 172885862, 223734480, 11089592, 534030215, 626987475, 301379053, 935550877, 60718180, 228079478, 214624709, 676567557, 386998126, 348496482, 832445040, 52820946, 647450196, 749162850, 665558895, 285983627, 240900055, 862807719, 401346642, 105799033, 914522924, 462908705, 737516821, 344412062, 935621775, 244568414, 476327425, 219840681, 388443750, 227551615, 250152782, 728858783, 637915774, 220226624, 161246101, 353847426, 590866271, 85818225, 704322133, 350297611, 831337940, 216758862, 956488596, 985963603, 63810666, 246372590, 860279076, 393315602, 256766774, 532175742, 944893778, 102744741, 727658665, 269747573, 628171864, 774740957, 904188779, 896469335, 211766137, 370514412, 416338734, 95233993, 891707640, 912836866, 630632320, 136895873, 493626133, 129794776, 138927093, 149351985, 816054141, 863313123, 796026909, 413994858, 105592389, 997064651, 104540001, 72338650, 586320152, 523129586, 812830566, 763811006, 593907588, 895049454, 55241226, 887771427, 836112168, 76166227, 394609738, 533359355, 35827832, 852557505, 581551519, 485954580, 477655224, 767774045, 558532353, 828023724, 747984521, 936045765, 239839836, 514289912, 499573090, 20163801, 924300687, 50390115, 636672549, 479083752, 101736759, 975615121, 525507276, 117194368, 531496914, 928517768, 45468227, 842857699, 439446204, 692087896, 399099044, 126536747, 312766530, 246092553, 730957250, 996580656, 948249874, 330911979, 482178234, 438261131, 157939366, 590475017, 306618464, 833227794, 169129322, 151126060, 312947098, 27643244, 98066400, 719302146, 609723933, 518156932, 720792449, 354138764, 446191875, 656339838, 264337064, 591563921, 989757422, 581131459, 388781238, 425243529, 756560359, 261747189, 147787582, 786327632, 69828080, 884788538, 758268375, 130029275, 214823774, 634042393, 87145675, 951365870, 178975317, 960811957, 26598257, 643705459, 707308339, 897385487, 474360665, 514357141, 747073081, 153812770, 181060743, 342746140, 179233092, 926772160, 828507575, 742413808, 384680657, 281309121, 162030434, 183849431, 765347644, 902245993, 395087093, 796295231, 954970925, 740729797, 930981460, 197000766, 192089010, 540552077, 273454066, 217113405, 203626479, 90093355, 257785393, 457924544, 226243813, 879915957, 1410821, 936330990, 838977650, 270918049, 407098806, 401816701, 264684234, 801130514, 446464363, 617057320, 610928008, 718758535, 944770556, 112110754, 253235466, 498952792, 113961409, 701349767, 866922855, 96454257, 49801812, 208948555, 845470309, 807552288, 325397351, 410718054, 662607243, 880788302, 126261137, 472430228, 403598630, 574490014, 983932738, 214454002, 768718851, 810630702, 980504778, 201924342, 840822201, 17070057, 782034175, 380727084, 753030391, 5881455, 978067809, 960148923, 785517407, 862245946, 185370157, 663440410, 170393915, 767757108, 909566624, 699070382, 894350410, 995456650, 975751891, 545313303, 29980991, 45661650, 848740875, 156930636, 343531551, 508561413, 135803935, 952539690, 379803830, 253203634, 405305110, 217687114, 30965596, 178657567, 739680620, 258416009, 46293948, 125849326, 369546386, 59988850, 591368636, 528132412, 941828554, 438141955, 418538830, 149839471, 468698636, 2824336, 681727448, 565941463, 836198009, 707523724, 232307780, 482275505, 233592366, 286731546, 649628537, 646675069, 598011911, 534435901, 287518908, 64742352, 4073149, 207191778, 912737343, 989839295, 973093717, 600400243, 174461015, 356244965, 607132074, 866574808, 311718185, 269785238, 853844794, 490564834, 238226926, 327827028, 684043109, 124513878, 362583968, 36785720, 527796288, 870457821, 557815013, 759491390, 786580292, 558638245, 187666552, 347989797, 977539870, 993983824, 114208731, 957510732, 419985838, 438321689, 896500916, 526763101, 132956347, 10298894, 338318396, 834227230, 939336878, 585292419, 254114524, 825738358, 985595481, 621846258, 580167590, 922886889, 191674081, 336007907, 55617068, 189810965, 914026967, 335421268, 808462670, 966388371, 483257264, 692085726, 586093575, 158491644, 124671801, 581815013, 394384078, 290521569, 504059367, 516191266, 724447448, 372867033, 513993737, 346052186, 765143063, 99150894, 490456552, 907206252, 983031546, 384955837, 444387863, 879135274, 456175304, 109738102, 11095263, 434972180, 36420596, 864082049, 394069056, 693106207, 49832274, 578796008, 812071491, 635947063, 889812033, 49126661, 569924964, 975399683, 837485913, 34183289, 615112801, 918693310, 24371484, 738839064, 225617626, 685770051, 363298122, 717545053, 402122207, 509535850, 887200132, 695308989, 863131706, 153479175, 197013276, 577027210, 714274124, 72814583, 386507996, 78759805, 121034923, 851815196, 557691637, 675359582, 766964172, 102847543, 870675139, 968924478, 597769140, 88039303, 815759384, 876383001, 311489086, 610378455, 455649281, 299561807, 538693119, 732303285, 222884583, 371967110, 777046307, 838710049, 809868439, 988284588, 506362554, 499019571, 117212689, 944072989, 364840180, 974016972, 854810787, 44336624, 715780655, 250170729, 8771065, 627710238, 289138911, 846278478, 827430717, 168915746, 877326564, 455479531, 68939329, 627205343, 886331775, 590938902, 709562167, 436270939, 983279344, 996711890, 436373630, 787147136, 346093707, 507155174, 101508116, 940890425, 230571936, 797175950, 989516286, 19865139, 620387843, 150158942, 622948130, 410035044, 110591058, 403872811, 969829523, 126014946, 900365496, 965835799, 525013986, 19999523, 413368640, 578103816, 649685994, 502504252, 978921966, 738546016, 372745873, 408554312, 399724016, 176594870, 683651322, 760575361, 842997036, 210285219, 707955715, 472016545, 93574184, 478739471, 555643339, 817089094, 26835776, 148159408, 866949217, 667641134, 617803851, 624868715, 379823776, 955221575, 430788548, 423273803, 927929240, 791055441, 907637411, 978066018, 258238159, 647147454, 502719442, 384080838, 601859833, 540097296, 414987220, 633194962, 605560450, 754096207, 864874532, 506033386, 438795258, 743974557, 194863065, 519699703, 867055245, 88500420, 487624203, 300260004, 843013453, 910924548, 791822862, 104110640, 88116372, 561882299, 643344966, 855671463, 789664405, 587666166, 488618269, 431520091, 116183944, 30552527, 73680123, 575980566, 202261401, 929030590, 59262270, 945165453, 695135308, 676026477, 571270590, 831024533, 538919624, 346840141, 201162542, 275335411, 580599876, 401068879, 921853974, 833958859, 146782568, 402647410, 720754262, 338772555, 339382878, 698130745, 43612562, 754203812, 97811940, 378349322, 114315943, 855802569, 142074341, 408805589, 539488032, 900781762, 689070940, 566869216, 683768124, 731317865, 662754505, 756174310, 312823734, 303280056, 808460603, 271704435, 351010827, 718016269, 666440366, 184857485, 291346303, 637425175, 961375682, 264629429, 275360193, 289039202, 562483751, 847994074, 633609529, 946970094, 644425733, 233425501, 468793217, 963367179, 934503211, 350619718, 732314876, 279994376, 684290512, 931202323, 359611672, 142566307, 273960760, 169862853, 295038290, 424437627, 670125590, 773668789, 832338922, 372585487, 885176371, 381804771, 323631123, 902296895, 44680114, 395956420, 752258185, 868831723, 579044819, 804641745, 974809010, 920380577, 302863241, 954426315, 757261013, 550593914, 494821388, 450537470, 475609194, 101199450, 500535930, 551138701, 294825508, 26057865, 822308182, 744504122, 569778024, 256360037, 835799222, 709915932, 712148442, 155714303, 480694939, 191439916, 59945157, 181363417, 70988141, 297558857, 428162949, 2930105, 338041157, 440742920, 210209614, 760184323, 835263756, 205432552, 670445565, 863002396, 764326622, 946455809, 46198952, 695972623, 5094624, 986293116, 425183772, 6255721, 822901651, 612558406, 466677620, 83061602, 132366457, 336195327, 537363666, 869162325, 198216691, 485054269, 809676744, 223029406, 804331643, 219335294, 871761905, 365141382, 462648018, 349269697, 628000417, 249885535, 217615162, 822123455, 515623278, 716192107, 917889714, 752300588, 446623183, 570082762, 908253580, 191497036, 455346303, 266100508, 821609940, 240098525, 637832739, 794460189, 219463120, 384640319, 291451641, 72245573, 233175172, 252604285, 859944674, 485740260, 390424922, 373710616, 423198854, 152263404, 7637303, 449799397, 712040781, 299267860, 848303675, 540075155, 79222116, 655677834, 307642913, 901519229, 788187459, 181198872, 302993776, 325688512, 413761152, 977529846, 4596197, 615183694, 428513457, 475300808, 743185913, 37988172, 246313539, 862191532, 405731830, 185462780, 96320659, 145482169, 192544741, 412296028, 430913668, 644263276, 713813007, 966134363, 633414553, 240565944, 285715231, 567967074, 354267520, 525531984, 924397477, 538362293, 570058622, 362868057, 699072272, 837320513, 567985651, 718442834, 10264189, 267412925, 828339976, 512898145, 199852780, 94170067, 884566122, 140553330, 66010591, 644212640, 428041004, 297461574, 153386065, 407548614, 48948903, 463411761, 862230243, 287005068, 315637020, 909328632, 785164800, 656769995, 179570155, 167469497, 799059689, 172873864, 202230494, 507781514, 441494092, 156343502, 16411274, 457955989, 730809065, 258251453, 776091261, 871802890, 781959186, 304053573, 761520798, 265619265, 144893131, 274233534, 3085479, 404371963, 627217584, 862764868, 999424368, 263035877, 621650303, 895416406, 173146994, 621484331, 772225432, 427426989, 971881072, 693846494, 855801357, 124456453, 121346396, 380978887, 251691734, 207982316, 374900486, 329665901, 495075218, 939994661, 222962979, 984175683, 340246029, 434797187, 357173068, 519567771, 989450332, 532168149, 865595458, 976953661, 158943955, 663404393, 146955360, 268162453, 816911237, 915486494, 953318298, 71468148, 632317564, 993390382, 944305815, 368654349, 567408930, 59571350, 439543635, 366544206, 14692138, 113533770, 353482465, 669819393, 845298479, 138417486, 299473758, 394080417, 878715978, 781242025, 924704619, 247466401, 943815099, 64869054, 925267289, 884079651, 950275998, 263192739, 254852283, 689566440, 293000100, 754242738, 163954377, 219504584, 60884807, 957930923, 403364402, 551138372, 52287003, 754524849, 309090755, 299618614, 799401491, 849982019, 500621076, 962363878, 127355929, 757341944, 325196622, 519328950, 280708864, 331098685, 630401247, 231064870, 334945248, 861442449, 214146923, 216467500, 397983142, 354226409, 568645386]
for i in range(n):
    s = int(input())
    print(ans[s])


Comments

Submit
0 Comments
More Questions

981A - Antipalindrome
365A - Good Number
1204B - Mislove Has Lost an Array
1409D - Decrease the Sum of Digits
1476E - Pattern Matching
1107A - Digits Sequence Dividing
1348A - Phoenix and Balance
1343B - Balanced Array
1186A - Vus the Cossack and a Contest
1494A - ABC String
1606A - AB Balance
1658C - Shinju and the Lost Permutation
1547C - Pair Programming
550A - Two Substrings
797B - Odd sum
1093A - Dice Rolling
1360B - Honest Coach
1399C - Boats Competition
1609C - Complex Market Analysis
1657E - Star MST
1143B - Nirvana
1285A - Mezo Playing Zoma
919B - Perfect Number
894A - QAQ
1551A - Polycarp and Coins
313A - Ilya and Bank Account
1469A - Regular Bracket Sequence
919C - Seat Arrangements
1634A - Reverse and Concatenate
1619C - Wrong Addition