#include <bits/stdc++.h>
using namespace std;
struct __s {
  __s() {
    srand(time(NULL));
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    if (!1)
      fprintf(stderr, "Execution time: %.3lf s.\n",
              (double)clock() / CLOCKS_PER_SEC);
    long long n;
    cin >> n;
  }
} __S;
long long st[11] = {0,        1000000,  10000000, 10000000, 10000000, 10000000,
                    10000000, 10000000, 10000000, 10000000, 10000000};
long long a[11][2111] = {
    {},
    {
        0,           2451992,     5305560,     8229032,     11087195,
        14010395,    17140527,    22528766,    26803166,    31147471,
        35556783,    40949935,    45355167,    49699454,    55161455,
        59501615,    63841823,    68194094,    73582846,    77988335,
        82328271,    86741967,    92130191,    96479135,    100892558,
        105232703,   110620990,   114961183,   119374863,   123714797,
        129107695,   133447357,   137865679,   142270879,   147659375,
        152003710,   156352079,   161740334,   166080559,   170490639,
        174903806,   180292062,   184706527,   188980911,   193324703,
        198713471,   203123039,   207528527,   211876670,   217269790,
        221679374,   226018814,   230297839,   235755967,   240165823,
        244505471,   248850063,   254307933,   258651966,   262996558,
        270765821,   277459523,   284144468,   309916773,   316618375,
        325605818,   332298409,   341293788,   347982314,   355925229,
        363671344,   371556468,   379355732,   386188696,   395043990,
        401803450,   409680348,   417491676,   425364734,   433110578,
        440987442,   448803446,   456675991,   463430535,   472360377,
        479114665,   486996171,   494807548,   502614816,   510426418,
        517250899,   526110838,   532939672,   542918330,   549746395,
        558602221,   565430526,   588966720,   597757285,   604659318,
        613449606,   620273815,   629129641,   635958202,   643766236,
        651643134,   659458576,   667265841,   675138388,   682949989,
        689782663,   698638539,   705463259,   713278701,   721016044,
        728959297,   736704577,   744586068,   752384852,   760266375,
        767029126,   775958987,   782713308,   790525148,   798401808,
        807323732,   815200852,   821897846,   830889385,   837582232,
        846577610,   853270730,   879035134,   885728784,   893552993,
        901416770,   908184199,   917105525,   923930042,   932851403,
        939622364,   947499262,   955232784,   963114017,   970921556,
        978798982,   986605685,   994487448,   1001245063,  1009122746,
        1016930283,  1024815680,  1032548929,  1040496245,  1048237412,
        1056049303,  1063922104,  1070688953,  1080729068,  1087487740,
        1096413234,  1103115638,  1111057799,  1118795142,  1125693353,
        1134479272,  1158150859,  1166941148,  1173765357,  1182633744,
        1189326930,  1197269347,  1205011864,  1211901609,  1220700090,
        1227589596,  1236388077,  1243212797,  1251020338,  1258897234,
        1266708837,  1274515813,  1282388615,  1290204056,  1298077626,
        1304836331,  1312651772,  1320524816,  1328332081,  1336143186,
        1345143192,  1352954553,  1359779002,  1368639195,  1375393483,
        1384319742,  1391082256,  1399950658,  1406766658,  1415630727,
        1422454935,  1445995723,  1454912220,  1461683420,  1470543102,
        1477364001,  1486158625,  1492982595,  1500790406,  1508667252,
        1516486841,  1524359576,  1531119341,  1539974398,  1546811664,
        1554610209,  1562491492,  1570302787,  1578241432,  1586048935,
        1593934539,  1601741276,  1608426187,  1618539809,  1625237571,
        1633176435,  1640921684,  1648868760,  1656606343,  1663434426,
        1672290540,  1679131390,  1687978768,  1694746690,  1703667506,
        1710361223,  1734028440,  1742822569,  1749720779,  1758511050,
        1765339373,  1774199857,  1781024049,  1788826674,  1796712532,
        1804519252,  1812331160,  1820203945,  1827945914,  1834778603,
        1843634464,  1850462769,  1858274676,  1866147717,  1873959063,
        1882954440,  1890765529,  1898638555,  1906446077,  1913278787,
        1922073428,  1928897364,  1936704645,  1944515992,  1952389562,
        1960196811,  1967033308,  1975823870,  1982713616,  1991508307,
        2015179365,  2023969430,  2030863526,  2038613434,  2046481848,
        2053245933,  2062101501,  2068934176,  2077781793,  2084622693,
        2092364116,  2100307369,  2108044473,  2115986874,  2123736796,
        2131605740,  2139417360,  2146179890,  2155171683,  2162979173,
        2170864297,  2178671511,  2186545116,  2194355949,  2202172158,
        2210036752,  2216807763,  2225728818,  2232553367,  2241474743,
        2248250315,  2256122588,  2263856074,  2270622957,  2279545120,
        2303081505,  2312002354,  2318777956,  2327695188,  2334458314,
        2342330826,  2350146541,  2356896766,  2365830945,  2372593441,
        2381449812,  2388274276,  2396085366,  2403958438,  2411770281,
        2420699868,  2428581374,  2436388640,  2444191538,  2451028564,
        2458831444,  2466708615,  2474515880,  2482327226,  2490204396,
        2497950205,  2504844048,  2513635138,  2520524884,  2529319540,
        2536213605,  2545012102,  2551901623,  2560692188,  2584232446,
        2591056673,  2599846689,  2606744626,  2615539267,  2622429302,
        2631219847,  2638113704,  2645855946,  2653732826,  2661548593,
        2669425746,  2676184162,  2686223989,  2692990870,  2700728198,
        2708671707,  2716417243,  2724298493,  2732101681,  2739982948,
        2747789908,  2754619288,  2763470488,  2770303161,  2778118364,
        2785987035,  2793733357,  2801606176,  2808369202,  2817286467,
        2824061558,  2832982885,  2839742411,  2848663256,  2872207853,
        2878893310,  2887892528,  2894589729,  2903650422,  2910335333,
        2919330968,  2926023608,  2933888135,  2941708235,  2949519323,
        2958511393,  2966318386,  2974199635,  2980962405,  2989884585,
        2996647080,  3004528348,  3012326893,  3020146942,  3027953936,
        3035761747,  3043634755,  3051450228,  3058278535,  3067134616,
        3073962698,  3082823149,  3089581822,  3097450256,  3105270834,
        3112094258,  3120954724,  3127779189,  3136573592,  3160240553,
        3169030874,  3175801852,  3183675169,  3191482433,  3198310723,
        3207167060,  3213995365,  3223973767,  3230806491,  3238613997,
        3246421246,  3254228256,  3262101297,  3269916739,  3277789814,
        3285601159,  3292429720,  3300237224,  3308118202,  3315860222,
        3323802912,  3331544865,  3339421251,  3347233108,  3355039828,
        3361869225,  3370724775,  3377557467,  3386343678,  3393245985,
        3400987425,  3408930661,  3415619412,  3441387637,  3448085110,
        3457001863,  3463773097,  3472563625,  3479458080,  3487195697,
        3496260979,  3502957924,  3511945640,  3518642327,  3527637962,
        3534322923,  3542204156,  3550015521,  3557963126,  3565761125,
        3573646999,  3581453462,  3589252743,  3596089786,  3603896762,
        3611704574,  3619577616,  3627397186,  3635208515,  3643081863,
        3649840246,  3658770361,  3665520073,  3674450156,  3681151228,
        3690073137,  3696832305,  3705757780,  3729297765,  3736118134,
        3744982168,  3751814841,  3761789404,  3768543452,  3777473584,
        3784162354,  3792108884,  3799855238,  3807732120,  3815539369,
        3822364089,  3831224010,  3837987069,  3845859856,  3853675569,
        3861548355,  3869359956,  3877236870,  3885048762,  3892921291,
        3899679964,  3908474076,  3915364112,  3923114017,  3931052883,
        3938794852,  3946671989,  3953430663,  3962294680,  3969123291,
        3977983484,  3984807696,  4010440754,  4017269059,  4023957827,
        4034076056,  4040769159,  4049764555,  4056453851,  4065379565,
        4072138000,  4081068389,  4087826770,  4095638117,  4103515253,
        4111318151,  4119129513,  4125892794,  4134818285,  4141576976,
        4149458465,  4157265202,  4165143158,  4172949861,  4180831400,
        4188564919,  4196515529,  4203208924,  4212274496,  4218958881,
        4227954260,  4234646851,  4242445908,  4250331527,  4257094023,
        4266015930,  4272709049,  4337544295,  4351576424,  4364843371,
        4376918074,  4391019511,  4405257176,  4418383816,  4432625337,
        4444560485,  4458801767,  4471929175,  4486105402,  4500203048,
        4512342999,  4525408999,  4539645878,  4553747845,  4837604504,
        4848441976,  4896299608,  4910401336,  4924704571,  4937708521,
        4949914600,  4963942037,  4978183846,  4991249831,  5005491303,
        5019593064,  5031671624,  5044925961,  5059032054,  5073268936,
        5087383207,  5098470550,  5113621878,  5144705912,  5175597673,
        5188856107,  5200721416,  5215028473,  5229138136,  5242269637,
        5256433030,  5268581783,  5282683239,  5295806534,  5309978152,
        5324220170,  5337286137,  5349351622,  5363523222,  5378883239,
        5409840552,  5421910648,  5434960232,  5465913385,  5480093451,
        5493281528,  5506466538,  5519457958,  5533699750,  5546822501,
        5560994953,  5574125912,  5587314745,  5600359687,  5614543864,
        5628649672,  5644074951,  5671738519,  5685984391,  5700094841,
        5714397239,  5745211706,  5757421578,  5770482664,  5784654054,
        5798821558,  5812010647,  5825142151,  5838129222,  5852367208,
        5865490216,  5879670281,  5892788967,  5908218858,  5920153511,
        5951172245,  5965273973,  5978533002,  5990484553,  6004717353,
        6035596296,  6049903351,  6061859560,  6076092341,  6089141381,
        6103317877,  6116510551,  6129633335,  6143871322,  6156862728,
        6170055399,  6185345750,  6216290249,  6229421736,  6241566104,
        6255602006,  6269839945,  6284007722,  6312871178,  6325990358,
        6340096216,  6354329236,  6367399572,  6380579429,  6394825576,
        6407883078,  6421005606,  6435243578,  6449484793,  6480441577,
        6492442261,  6506679975,  6520855926,  6533921897,  6547106119,
        6560234059,  6574330889,  6605292278,  6617428165,  6631600071,
        6644723093,  6658829156,  6672021317,  6685080137,  6699251241,
        6714611242,  6726759912,  6757568743,  6771740614,  6784999045,
        6798052776,  6811175783,  6825355335,  6839592230,  6851602187,
        6882616055,  6895747815,  6909783924,  6922972806,  6936091508,
        6950337127,  6963390278,  6976517928,  6991803688,  7021712375,
        7035880152,  7049076679,  7062125701,  7076305764,  7089433720,
        7102614328,  7116732233,  7129781254,  7144092919,  7172870374,
        7187111861,  7201221749,  7214480519,  7227398214,  7240660806,
        7255946808,  7286966282,  7298974967,  7313146071,  7326269061,
        7340441255,  7353568373,  7367744088,  7380863046,  7394969385,
        7407109126,  7421289206,  7452246760,  7465291413,  7478480501,
        7491541588,  7505853048,  7521073496,  7550056537,  7564031239,
        7577293560,  7591395558,  7604518823,  7617641861,  7631813511,
        7644997957,  7658068278,  7672301368,  7686477577,  7699526389,
        7711613142,  7742623381,  7756795286,  7770901093,  7782971461,
        7797361000,  7828170554,  7842346537,  7855534823,  7868736233,
        7881715620,  7895957125,  7909079892,  7923260281,  7936374854,
        7950546471,  7962625319,  7976801016,  7990903014,  8021983126,
        8032815733,  8047119222,  8062343766,  8093423944,  8106494041,
        8119608585,  8132727510,  8146907334,  8161083320,  8174267813,
        8187460726,  8200386885,  8214693975,  8227747112,  8241989128,
        8255055095,  8268239031,  8281288580,  8312306821,  8327539591,
        8358624137,  8369440582,  8383747880,  8397858313,  8412168937,
        8425152711,  8437222804,  8451402885,  8465570932,  8478697542,
        8492935238,  8506202185,  8519115784,  8532308966,  8546484935,
        8560729511,  8610619047,  8621706119,  8652593784,  8666839914,
        8680941625,  8694130714,  8706077944,  8720318953,  8734486453,
        8747609511,  8761789575,  8773860184,  8788023110,  8801154872,
        8815331097,  8829572087,  8841437622,  8854695317,  8870129320,
        8917785974,  8931826569,  8942991993,  8957163850,  8971261192,
        8985502968,  8998629609,  9012871112,  9024802165,  9039047542,
        9052174951,  9066351177,  9080448840,  9092589064,  9105654775,
        9119891671,  9403547558,  9417850279,  9428687751,  9476545383,
        9490647111,  9504950603,  9517959451,  9530160375,  9544192455,
        9558429638,  9571495607,  9585728886,  9597938296,  9611909207,
        9625171993,  9639273735,  9653510616,  9667699177,  9679834807,
        9693933190,  9724951687,  9755835273,  9768053593,  9780967192,
        9795274266,  9809383911,  9822580966,  9835630230,  9848823463,
        9862933639,  9876052822,  9890228567,  9904461881,  9916614410,
        9929597414,  9944953304,  9959129015,  9990086328,  10001104263,
        10015206008, 10046224712, 10060339227, 10073523209, 10086712570,
        10099704007, 10113945524, 10127068532, 10141306262, 10154371704,
        10167560519, 10180605463, 10194785801, 10210084090, 10223272168,
        10251988920, 10266221975, 10280340887, 10294643271, 10323360329,
        10336618810, 10350728458, 10364899829, 10378019304, 10391207847,
        10405387943, 10418366804, 10431564408, 10445735991, 10459916313,
        10474149401, 10486367738, 10500399304, 10531418053, 10545519765,
        10557726104, 10570734730, 10584963125, 10615846457, 10629100810,
        10642101240, 10655289574, 10669387157, 10682515077, 10696756325,
        10709879110, 10724117097, 10736059928, 10751419929, 10765591542,
        10795487466, 10808618935, 10821811878, 10835905124, 10850081881,
        10862156345, 10893116954, 10906232087, 10920342006, 10934579686,
        10946723748, 10960829590, 10974022774, 10988124758, 11001251381,
        11016607835, 11029731082, 11060752888, 11072688326, 11086925751,
        11101097606, 11114167685, 11127351894, 11140479834, 11154642455,
        11185538055, 11197673941, 11211845864, 11224968869, 11239074932,
        11252258900, 11265391446, 11280685912, 11294857032, 11306993481,
        11337814519, 11350946023, 11365244820, 11378364088, 11391421557,
        11405597526, 11418789429, 11431843899, 11462862088, 11475989495,
        11490029717, 11502165942, 11516337284, 11530583157, 11544754535,
        11557882200, 11571000888, 11601958153, 11616130553, 11628273896,
        11642375846, 11656552052, 11669671302, 11682860135, 11696973911,
        11710027030, 11724330504, 11753116150, 11767357671, 11781463941,
        11794726295, 11807644004, 11822020967, 11836192838, 11867212058,
        11879220761, 11893387767, 11906515415, 11920687029, 11933814165,
        11946941285, 11961113191, 11974166582, 11987359287, 12001534983,
        12032493048, 12045537462, 12057677717, 12071852900, 12087213208,
        12101319272, 12130302312, 12143228439, 12157531913, 12171641334,
        12184830184, 12197887637, 12212059286, 12225243988, 12238309958,
        12252547159, 12265674809, 12279837702, 12291858933, 12322877895,
        12337041062, 12352335255, 12364335717, 12377606776, 12408481863,
        12422592569, 12435781128, 12448977913, 12461961429, 12476202901,
        12489325684, 12503563399, 12516620630, 12529743670, 12542871095,
        12557043209, 12571148790, 12601180343, 12613127045, 12628483478,
        12642589541, 12673669719, 12686744185, 12698806041, 12712977944,
        12727149013, 12740280537, 12754513589, 12767706502, 12780628564,
        12793891687, 12807993397, 12822230808, 12835296824, 12847436263,
        12861534405, 12911566775, 12925672872, 12954664361, 12967582311,
        12981889352, 12995995722, 13009257755, 13022246119, 13035364806,
        13049614263, 13062663861, 13076909446, 13091076711, 13104343673,
        13116208680, 13130450456, 13144626408, 13159989994, 13187719095,
        13201952151, 13232835719, 13247085706, 13260138824, 13273327946,
        13286319625, 13300560633, 13313683670, 13327921077, 13340986775,
        13354101893, 13367220310, 13381400646, 13395581258, 13409814026,
        13423138553, 13436065000, 13450375112, 13498031782, 13512072344,
        13523229577, 13537409625, 13551572504, 13565748746, 13578867960,
        13591019753, 13605048213, 13619293574, 13632412534, 13646662489,
        13658597463, 13672830744, 13685900808, 13969691383, 13983793368,
        13998096055, 14042627769, 14056787062, 14070897272, 14085196377,
        14098201131, 14110402072, 14124438263, 14138740967, 14151741383,
        14165974662, 14178184071, 14192154983, 14205417768, 14219519511,
        14234875930, 14246896889, 14260080856, 14274178966, 14305197462,
        14336076952, 14347250792, 14361212966, 14375520042, 14389634842,
        14402826742, 14415880664, 14429069239, 14443179415, 14456294500,
        14470470247, 14483659112, 14497978955, 14510957848, 14525199080,
        14539374824, 14570332104, 14581350039, 14595451783, 14626466392,
        14640585511, 14652720920, 14665910043, 14679949783, 14694191333,
        14707310212, 14721552037, 14734621848, 14747806551, 14760855623,
        14776150089, 14790329867, 14803517944, 14832300249, 14846468006,
        14860586662, 14874885460, 14903606121, 14916864600, 14930970138,
        14945203206, 14958265080, 14971453656, 14984585141, 14998612836,
        15011810181, 15025982038, 15040363078, 15054395177, 15066613531,
        15080649977, 15111667942, 15125770166, 15137971879, 15151046054,
        15165208901, 15196092230, 15208293913, 15222347274, 15235535606,
        15249703383, 15262822293, 15276998053, 15290120804, 15305481354,
        15317424199, 15331665704, 15345833223, 15375799034, 15387816152,
        15402057669, 15416150900, 15430327653, 15442406490, 15473362726,
        15486482248, 15500584199, 15513776886, 15526969573, 15541075366,
        15554268550, 15567321957, 15582615638, 15595801448, 15609976857,
        15638902537, 15652934118, 15667171560, 15680294837, 15693364884,
        15706544997, 15720721512, 15734888230, 15763686679, 15777915911,
        15792087543, 15805219543, 15818268548, 15832509557, 15846755702,
        15860931704, 15873005655, 15887239257, 15918061064, 15931187703,
        15944442071, 15957561288, 15971667333, 15985843301, 15997986629,
        16012089672, 16042059544, 16056231192, 16069357989, 16082411735,
        16096583060, 16111943318, 16123947638, 16138127975, 16151251287,
        16182269463, 16196372522, 16208515832, 16222621911, 16235749252,
        16249917094, 16263105910, 16276298599, 16290272805, 16304576296,
        16333362183, 16347603447, 16360661158, 16376090552, 16388090757,
        16402267253, 16416438614, 16447449705, 16459466537, 16473633800,
        16486765816, 16500998374, 16514064310, 16527183477, 16541354870,
        16554412374, 16567605062, 16581781015, 16611809033, 16625783238,
        16637923526, 16653213573, 16667454888, 16681565062, 16710548088,
        16723474214, 16737773593, 16751887369, 16765075960, 16778203847,
        16791252901, 16805489780, 16818555732, 16832797304, 16845920583,
        16860087847, 16872096774, 16903120087, 16918409688, 16932581047,
        16943532917, 16957840263, 16988727895, 17002838344, 17014974232,
        17029220378, 17042203109, 17056448726, 17069567364, 17083805079,
        17096866405, 17109985350, 17123116870, 17137289241, 17151395079,
        17200440824, 17212527577, 17226624951, 17240800919, 17271811206,
        17283832986, 17296947512, 17311119417, 17325356311, 17338422010,
        17351606759, 17365847975, 17378770037, 17392024967, 17406134870,
        17420437816, 17433438297, 17445574425, 17460794359, 17491812568,
        17505914552, 17534910136, 17547893622, 17562135127, 17576246121,
        17589500203, 17602496298, 17615610582, 17629860072, 17642975173,
        17657151126, 17670273910, 17683540873, 17696454710, 17710696232,
        17725986618, 17740301306, 17767965160, 17782198183, 17813081495,
        17827323304, 17840384872, 17852525145, 17866626873, 17880802570,
        17893929446, 17908166871, 17921236920, 17934347669, 17947470710,
        17961646678, 17975827049, 17991178282, 18002335786, 18016306680,
        18030620905, 18078277558, 18091269800, 18103475352, 18117651337,
        18131818278, 18144945946, 18159113993, 18171265785, 18185294022,
        18198491029, 18212658326, 18226904213, 18238843239, 18252027942,
        18535770426, 18549933579, 18564043769, 18575196649, 18622873545,
        18637033107, 18651143302, 18664393577, 18676349802, 18690643752,
        18704684552, 18717938423, 18731987177, 18744123302, 18758425751,
        18771352182, 18785663544, 18800883767, 18815187242, 18826090506,
        18840326631, 18854424791, 18885443251, 18916327097, 18927492469,
        18941598584, 18955765815, 18969876521, 18983064328, 18995077880,
        19009315304, 19023421351, 19036605811, 19050716021, 19065023369,
        19078224730, 19091203624, 19105445385, 19119612408, 19149660393,
        19161595813, 19175697555, 19206712165, 19220827189, 19232966694,
        19246155834, 19260336170, 19274437109, 19287564742, 19300749237,
        19313814952, 19329166710, 19342219879, 19356461399, 19370572315,
        19383760393, 19412546281, 19426713815, 19440828341, 19455131235,
        19483851894, 19497106279, 19511212326, 19525444886, 19538511130,
        19551695335, 19564830934, 19578858611, 19592056213, 19607416199,
        19620609110, 19634645608, 19646851162, 19660895754, 19691913718,
        19704967383, 19717169078, 19731283638, 19745451091, 19776338006,
        19788539958, 19802588954, 19815773447, 19829949159, 19843068102,
        19856195251, 19871485317, 19884674455, 19897669991, 19911907382,
        19925030423, 19956045323, 19968066297, 19982303718, 19996401557,
        20010573429, 20022652293, 20052559958, 20066793559, 20080829975,
        20094022920, 20107215349, 20121321944, 20135632807, 20148751766,
        20162914661, 20176047224, 20190222632, 20219144217, 20233175815,
        20247417592, 20260540630, 20273672131, 20286790773, 20300967286,
        20315138391, 20343924261, 20358166056, 20371285512, 20385530855,
        20398514373, 20412825238, 20426997398, 20441177479, 20453251431,
        20467485032, 20497381144, 20511433992, 20524687862, 20537807081,
        20551909013, 20566085235, 20578228563, 20592400984, 20622305335,
        20636476968, 20648547078, 20662657510, 20678021863, 20692189094,
        20704197783, 20718369654, 20731497063, 20762511142, 20775569722,
        20788762121, 20802867686, 20815995077, 20829114294, 20843347590,
        20856544374, 20870514485, 20882724919, 20913608215, 20927849224,
        20942025415, 20955288281, 20968336789, 20982513029, 20996676197,
        21025598328, 21039716952, 21052830999, 21067007529, 21080191478,
        21094310103, 21107429253, 21121600646, 21133605989, 21147851350,
        21162018598, 21192054841, 21203931911, 21219353319, 21233459382,
        21247696568, 21259713686, 21290794118, 21303781430, 21318019384,
        21331084569, 21344273673, 21358454248, 21371498694, 21385739925,
        21398867299, 21413038983, 21426166375, 21439285046, 21452342550,
        21502375979, 21516551161, 21529805289, 21541674646, 21555981992,
        21586869380, 21600979817, 21613115719, 21627357755, 21640410136,
        21654590199, 21667713752, 21680897975, 21695007894, 21708126820,
        21721328248, 21735492151, 21750790474, 21780686601, 21792769769,
        21806870760, 21821046727, 21852056980, 21864132009, 21877189192,
        21891365191, 21905602087, 21918660619, 21931852535, 21945045736,
        21959016068, 21972270743, 21986380644, 21999635048, 22013753977,
        22026938682, 22041040392, 22072058359, 22086169066, 22114107336,
        22128143767, 22142380900, 22156491897, 22169745976, 22182742089,
        22195856391, 22210101752, 22223220966, 22237396902, 22250519686,
        22263778456, 22276700486, 22292126024, 22306228554, 22320544011,
        22348210936, 22362443976, 22393327271, 22407564982, 22419582070,
        22432770919, 22446877288, 22461048601, 22474180120, 22488412647,
        22500434153, 22514593444, 22527716742, 22541953892, 22557191322,
        22569327208, 22582581562, 22596552473, 22610866681, 22658523367,
        22669615032, 22683721127, 22697884823, 22712060470, 22725191975,
        22737262633, 22751507978, 22765605334, 22778736838, 22792908727,
        22807149987, 23088713112, 23101827655, 23116008057, 23130244889,
        23144290058, 23155442681, 23203119594, 23217278883, 23231389332,
        23244639364, 23256661129, 23270889527, 23284930328, 23298184200,
        23312232953, 23324369095, 23338671780, 23351663492, 23367019924,
        23381129798, 23394384440, 23406340683, 23420568586, 23434674936,
        23465755112, 23494475721, 23507734180, 23521844358, 23536011590,
        23549069624, 23562261528, 23575324169, 23589561336, 23602618568,
        23616851603, 23632080294, 23644220567, 23657421930, 23671449398,
        23685691161, 23699858954, 23727809015, 23741841622, 23755943331,
        23786962598, 23800016195, 23813216839, 23826401607, 23840581946,
        23853626118, 23867806454, 23880995031, 23895179208, 23908363910,
        23922465654, 23936703079, 23949769514, 23961909016, 23992792842,
        24006959607, 24021074150, 24033279907, 24063180163, 24077352054,
        24091458100, 24104642084, 24117708330, 24131946266, 24145076710,
        24160429016, 24173420470, 24187661975, 24200846692, 24213842808,
        24227096936, 24241141785, 24272212743, 24285213158, 24297414887,
        24311529414, 24325688675, 24356583780, 24368785734, 24381917479,
        24396019239, 24410194968, 24423313878, 24437563878, 24451731092,
        24464920231, 24478055832, 24492153414, 24505280567, 24536291369,
        24548312586, 24562549494, 24576651462, 24589901700, 24602898068,
        24632794468, 24647039335, 24661075766, 24673220120, 24687452934,
        24702817273, 24715878616, 24728997540, 24742112628, 24756292998,
        24770460280, 24799390007, 24813417495, 24827663369, 24840790775,
        24853917924, 24867041174, 24881213062, 24895384180, 24924170036,
        24938412086, 24951531288, 24966895386, 24979878646, 24993071848,
        25007243174, 25021423271, 25033489014, 25047730808, 25077626919,
        25091679768, 25103876871, 25118053368, 25132155062, 25145282451,
        25158470243, 25172646772, 25202555496, 25216722742, 25228797479,
        25244022296, 25258267639, 25271386327, 25284509095, 25297562758,
        25311743094, 25342757172, 25354766953, 25369003817, 25383113735,
        25396302324, 25409360087, 25422544790, 25436790148, 25450752067,
        25462970695, 25493849894, 25509279273, 25522263560, 25535529960,
        25548587463, 25562758804, 25576926358, 25605844103, 25620028264,
        25633076772, 25647253305, 25660437512, 25673503207, 25687675078,
        25700797846, 25713917300, 25728097124, 25741215798, 25791314810,
        25803192377, 25817494809, 25831600855, 25845903850, 25857855159,
        25888935589, 25901918804, 25916161111, 25929296711, 25942415144,
        25956653130, 25969640183, 25982833127, 25997004692, 26010131880,
        26024303751, 26036378199, 26051602503, 26082621771, 26096796938,
        26109002489, 26121920695, 26136227768, 26167106964, 26180177300,
        26193361495, 26206554969, 26220655912, 26233787400, 26247963897,
        26261147880, 26275258295, 26287324276, 26301566087, 26316856440,
        26331036249, 26358835273, 26373003274, 26387116536, 26401292520,
        26430205860, 26444373689, 26457430900, 26471610967, 26484799285,
        26498906394, 26512098569, 26525287416, 26538344887, 26552516533,
        26566626452, 26580999303, 26594004122, 26607180360, 26621290569,
        26652370184, 26666411258, 26694353129, 26708389557, 26722626932,
        26736729479, 26748943176, 26762070360, 26776102167, 26790340361,
        26803466741, 26817642712, 26829712789, 26845142713, 26858130293,
        26872371800, 26886474329, 26899741211, 26928457497, 26942689783,
        26973577705, 26987872197, 26999832231, 27013016693, 27027123064,
        27041290279, 27054421800, 27067609864, 27080741369, 27094839493,
        27107962517, 27123318148, 27137424809, 27149572984, 27162827337,
        27176863785, 27191097354, 27238769140, 27249860825, 27263966903,
        27278130596, 27292306499, 27305437748, 27317512825, 27331754026,
        27345855512, 27358982612, 27373154520, 27654852548, 27668958888,
        27682073428, 27696253833, 27710490917, 27724536090, 27735689242,
        27783353082, 27797524708, 27811635108, 27822787988, 27836894616,
        27851135557, 27865176101, 27878429992, 27892466442, 27904614869,
        27920036311, 27933097655, 27947261604, 27961380213, 27973581639,
        27986582394, 28000810265, 28014920713, 28046000885, 28073672938,
        28087975860, 28102090389, 28116257364, 28129315671, 28141459236,
        28155631385, 28169807129, 28182860263, 28198216149, 28211277748,
        28224462247, 28237659557, 28251760709, 28265936933, 28280109099,
        28308046603, 28322092023, 28336325077, 28367208373, 28379340403,
        28392414068, 28406647383, 28420823624, 28433871893, 28448052231,
        28462359544,
    },
    {
        0,          10684262,   21818416,   32917177,   44262765,   55595204,
        66693165,   78038807,   89139198,   100469239,  111816120,  122914223,
        134269578,  145603427,  156702159,  168047800,  179380159,  190478181,
        201823788,  212922519,  224267412,  235599831,  246698541,  258044152,
        269780437,  281416441,  296280998,  309579622,  321325881,  333047046,
        345027197,  356773364,  368520257,  380499710,  392233770,  404098466,
        415959757,  427706651,  439699964,  451420486,  463171190,  475160646,
        486906872,  498626738,  510620047,  522613361,  534099948,  546333503,
        558332881,  569819609,  585648774,  597983741,  609963160,  621464362,
        633431318,  645437098,  657100413,  668903165,  680883315,  692630874,
        704363821,  716353279,  728090918,  739837175,  751810100,  763563491,
        775542916,  787175732,  799024572,  811262581,  822764405,  834730006,
        846735643,  860021788,  874395030,  886386589,  898366708,  910085237,
        921834159,  933826755,  945573646,  957308010,  969286829,  981033663,
        992780554,  1004753661, 1016494405, 1028477722, 1040230483, 1051963925,
        1063947095, 1075941048, 1087683968, 1099666729, 1111400425, 1123134150,
        1135127321, 1149386105, 1163070787, 1174791402, 1186770221, 1198504555,
        1210251212, 1222230873, 1233977796, 1245712823, 1257690946, 1269425303,
        1281417960, 1293166531, 1304897885, 1316877975, 1328625324, 1340365139,
        1352596941, 1364378737, 1376100658, 1388070218, 1400037167, 1411546806,
        1423530778, 1438753836, 1451693779, 1463196248, 1475161146, 1487141297,
        1498697638, 1510640740, 1522614507, 1534348094, 1546108292, 1558087042,
        1569821538, 1581566217, 1593534595, 1605280920, 1617429429, 1629213766,
        1641000456, 1652990524, 1664644268, 1676460561, 1688441288, 1699992569,
        1712143804, 1728118380, 1740095962, 1751765127, 1763578803, 1775545444,
        1787292318, 1799040470, 1811018040, 1822752352, 1834512412, 1846491865,
        1858225593, 1870217548, 1882202761, 1893945227, 1905937240, 1917671604,
        1929414230, 1941386514, 1953144784, 1964878491, 1976844135, 1988849952,
        2001511563, 2016510075, 2028491580, 2040469176, 2051982610, 2063962761,
        2075830294, 2087443295, 2099433413, 2111249439, 2123148467, 2134890856,
        2146675283, 2158868089, 2170602514, 2182362601, 2194328495, 2206075084,
        2217809156, 2229788211, 2241780828, 2253281995, 2265262149, 2277254069,
        2291924674, 2304913551, 2316906199, 2328885144, 2340385516, 2352366215,
        2364345672, 2376092591, 2387826724,
    },
    {
        0,          10030150,   20103656,   30157030,   40244418,   50297965,
        60385397,   70439739,   80526333,   90614472,   100668684,  110755406,
        120809620,  130896121,  140950599,  151038030,  161116876,  171178966,
        181265157,  191319683,  201407250,  211460440,  221547962,  231602494,
        241688675,  251776153,  261829432,  271989918,  282063980,  292616461,
        302977822,  313117791,  323260113,  333334566,  343475818,  353567409,
        363691300,  373801023,  383908068,  394043942,  404144704,  414264322,
        424373242,  434480336,  444588680,  454721902,  464810971,  474945495,
        485052554,  495162278,  505299376,  515377716,  525519012,  535593155,
        545767448,  555878902,  565984222,  576499622,  586890963,  597037907,
        607145131,  617253388,  627393572,  637468872,  647611330,  657719847,
        667826941,  677935677,  688044872,  698180067,  708292150,  718399203,
        728508876,  738617307,  748724322,  758864369,  768947731,  779081055,
        789189533,  799297918,  809469221,  819546310,  829687563,  839763042,
        849903045,  860382858,  870773491,  880955568,  891033580,  901173590,
        911280644,  921389030,  931529034,  941605805,  951745765,  961854240,
        971962545,  982070961,  992180335,  1002316827, 1012427749, 1022534801,
        1032643231, 1042752902, 1052860006, 1062999967, 1073083997, 1083249728,
        1093358126, 1103466468, 1113605206, 1123681908, 1133823097, 1143993474,
        1154643087, 1164875683, 1174953745, 1185091122, 1195169228, 1205308922,
        1215416328, 1225526002, 1235664719, 1245742464, 1255881405, 1265989875,
        1276098180, 1286205320, 1296326511, 1306453590, 1316563346, 1326671823,
        1336778785, 1346921504, 1357028556, 1367168551, 1377246621, 1387384044,
        1397493678, 1407602065, 1417740779, 1427876682, 1438525577, 1448756589,
        1458870029, 1469011242, 1479089343, 1489226775, 1499333863, 1509443493,
        1519551925, 1529661611, 1539800314, 1549908703, 1560015757, 1570125435,
        1580233910, 1590340914, 1600481895, 1610581777, 1620731932, 1630840372,
        1640947378, 1651080615, 1661165091, 1671304158, 1681382264, 1691519685,
        1701657188, 1711759211, 1722407491, 1732650232, 1742790142, 1752899821,
        1763006957, 1773146966, 1783223735, 1793362404, 1803472083, 1813580471,
        1823687566, 1833796307, 1843935913, 1854044346, 1864152688, 1874261038,
        1884402460, 1894509476, 1904649558, 1914727222, 1924866335, 1934975574,
        1945083019, 1955224317, 1965299797, 1975439798, 1985517950, 1995655283,
        2006276380, 2016569050, 2026710300,
    },
    {
        0,          10000760,   20004106,   30005636,   40009442,   50010968,
        60014778,   70016361,   80020114,   90023745,   100025446,  110029200,
        120030832,  130034534,  140036168,  150039866,  160041504,  170045254,
        180048957,  190050532,  200054284,  210055864,  220059638,  230061197,
        240065010,  250066953,  260070343,  270078258,  280080967,  290127491,
        300151151,  310160647,  320164604,  330169581,  340175777,  350178516,
        360185246,  370187504,  380194121,  390198618,  400203055,  410207553,
        420212049,  430218662,  440223159,  450227596,  460232092,  470236590,
        480241026,  490247699,  500250071,  510256632,  520261189,  530265567,
        540274531,  550276685,  560283408,  570285610,  580342938,  590360914,
        600365405,  610372019,  620374339,  630381009,  640385264,  650389945,
        660394442,  670398880,  680405436,  690409514,  700414484,  710418982,
        720423419,  730427915,  740432558,  750436791,  760443523,  770447900,
        780452456,  790456894,  800461390,  810470237,  820472559,  830479173,
        840481553,  850488107,  860534741,  870558168,  880567900,  890570222,
        900576834,  910581337,  920585768,  930591802,  940594704,  950601374,
        960605813,  970610308,  980614746,  990619252,  1000623740, 1010630234,
        1020634848, 1030639345, 1040643842, 1050648279, 1060654528, 1070657213,
        1080666121, 1090668444, 1100675054, 1110679546, 1120683934, 1130690660,
        1140692863, 1150750142, 1160765985, 1170772658, 1180777158, 1190781591,
        1200788205, 1210790585, 1220797139, 1230801694, 1240806131, 1250810628,
        1260815126, 1270821681, 1280826235, 1290830672, 1300835168, 1310839606,
        1320844043, 1330850715, 1340852977, 1350861885, 1360866251, 1370870875,
        1380875316, 1390879812, 1400886424, 1410888806, 1420895359, 1430908260,
        1440964298, 1450975152, 1460977416, 1470984086, 1480986408, 1490993020,
        1500997464, 1511001956, 1521006920, 1531010891, 1541017502, 1551021999,
        1561026496, 1571030933, 1581035429, 1591039909, 1601046539, 1611052791,
        1621057707, 1631062263, 1641066642, 1651072965, 1661075636, 1671082308,
        1681084560, 1691091182, 1701095911, 1711100115, 1721157240, 1731173239,
        1741179909, 1751182231, 1761188845, 1771193404, 1781197837, 1791204391,
        1801206771, 1811213325, 1821217881, 1831222323, 1841226815, 1851231313,
        1861237925, 1871242419, 1881249095, 1891253531, 1901258028, 1911262465,
        1921269137, 1931271459, 1941278072, 1951282453, 1961287005, 1971293671,
        1981296058, 1991302612, 2001315509,
    },
    {
        0,          10000008,   20000096,   30000114,   40000208,   50000226,
        60000320,   70000339,   80000432,   90000522,   100000544,  110000637,
        120000656,  130000749,  140000768,  150000861,  160000880,  170000973,
        180001065,  190001085,  200001178,  210001197,  220001290,  230001309,
        240001402,  250001427,  260001514,  270001751,  280001787,  290004429,
        300005186,  310005454,  320005544,  330005659,  340005766,  350005863,
        360006040,  370006069,  380006246,  390006348,  400006451,  410006553,
        420006656,  430006833,  440006935,  450007038,  460007140,  470007244,
        480007345,  490007523,  500007550,  510007727,  520007828,  530007932,
        540008183,  550008212,  560008388,  570008417,  580011412,  590011977,
        600012085,  610012261,  620012290,  630012466,  640012559,  650012671,
        660012774,  670012876,  680012989,  690013082,  700013257,  710013360,
        720013462,  730013566,  740013668,  750013771,  760013947,  770014050,
        780014152,  790014256,  800014357,  810014610,  820014638,  830014815,
        840014843,  850015019,  860017595,  870018357,  880018686,  890018715,
        900018891,  910018992,  920019096,  930019199,  940019302,  950019478,
        960019574,  970019683,  980019786,  990019889,  1000019991, 1010020152,
        1020020211, 1030020373, 1040020474, 1050020578, 1060020680, 1070020783,
        1080021034, 1090021063, 1100021239, 1110021337, 1120021445, 1130021622,
        1140021650, 1150024590, 1160025141, 1170025317, 1180025420, 1190025521,
        1200025698, 1210025727, 1220025903, 1230026006, 1240026108, 1250026211,
        1260026314, 1270026419, 1280026589, 1290026695, 1300026798, 1310026902,
        1320027003, 1330027172, 1340027208, 1350027461, 1360027489, 1370027665,
        1380027767, 1390027870, 1400028046, 1410028076, 1420028251, 1430028574,
        1440031526, 1450031917, 1460031948, 1470032124, 1480032153, 1490032329,
        1500032432, 1510032535, 1520032637, 1530032739, 1540032915, 1550033018,
        1560033120, 1570033223, 1580033326, 1590033429, 1600033604, 1610033641,
        1620033885, 1630033989, 1640034090, 1650034194, 1660034295, 1670034473,
        1680034501, 1690034678, 1700034710, 1710034882, 1720037757, 1730038373,
        1740038549, 1750038578, 1760038754, 1770038857, 1780038960, 1790039136,
        1800039165, 1810039341, 1820039444, 1830039547, 1840039649, 1850039752,
        1860039854, 1870040031, 1880040208, 1890040311, 1900040413, 1910040516,
        1920040620, 1930040722, 1940040897, 1950040927, 1960041102, 1970041206,
        1980041308, 1990041485, 2000041741,
    },
    {
        0,          10000000,   20000001,   30000001,   40000002,   50000002,
        60000003,   70000003,   80000004,   90000005,   100000005,  110000006,
        120000006,  130000007,  140000007,  150000008,  160000008,  170000009,
        180000010,  190000010,  200000011,  210000011,  220000012,  230000012,
        240000013,  250000013,  260000014,  270000017,  280000017,  290000097,
        300000107,  310000110,  320000111,  330000112,  340000113,  350000114,
        360000116,  370000116,  380000118,  390000119,  400000120,  410000121,
        420000122,  430000124,  440000125,  450000126,  460000127,  470000128,
        480000129,  490000131,  500000131,  510000133,  520000134,  530000135,
        540000138,  550000138,  560000140,  570000140,  580000224,  590000232,
        600000233,  610000235,  620000235,  630000237,  640000238,  650000239,
        660000240,  670000241,  680000242,  690000243,  700000245,  710000246,
        720000247,  730000248,  740000249,  750000250,  760000252,  770000253,
        780000254,  790000255,  800000256,  810000259,  820000259,  830000261,
        840000261,  850000263,  860000342,  870000352,  880000356,  890000356,
        900000358,  910000359,  920000360,  930000361,  940000362,  950000364,
        960000365,  970000366,  980000367,  990000368,  1000000369, 1010000371,
        1020000371, 1030000373, 1040000374, 1050000375, 1060000376, 1070000377,
        1080000380, 1090000380, 1100000382, 1110000383, 1120000384, 1130000386,
        1140000386, 1150000470, 1160000477, 1170000479, 1180000480, 1190000481,
        1200000483, 1210000483, 1220000485, 1230000486, 1240000487, 1250000488,
        1260000489, 1270000490, 1280000492, 1290000493, 1300000494, 1310000495,
        1320000496, 1330000498, 1340000498, 1350000501, 1360000501, 1370000503,
        1380000504, 1390000505, 1400000507, 1410000507, 1420000509, 1430000513,
        1440000597, 1450000602, 1460000602, 1470000604, 1480000604, 1490000606,
        1500000607, 1510000608, 1520000609, 1530000610, 1540000612, 1550000613,
        1560000614, 1570000615, 1580000616, 1590000617, 1600000619, 1610000619,
        1620000622, 1630000623, 1640000624, 1650000625, 1660000626, 1670000628,
        1680000628, 1690000630, 1700000630, 1710000632, 1720000715, 1730000723,
        1740000725, 1750000725, 1760000727, 1770000728, 1780000729, 1790000731,
        1800000731, 1810000733, 1820000734, 1830000735, 1840000736, 1850000737,
        1860000738, 1870000740, 1880000742, 1890000743, 1900000744, 1910000745,
        1920000746, 1930000747, 1940000749, 1950000749, 1960000751, 1970000752,
        1980000753, 1990000755, 2000000758,
    },
    {
        0,          10000000,   20000000,   30000000,   40000000,   50000000,
        60000000,   70000000,   80000000,   90000000,   100000000,  110000000,
        120000000,  130000000,  140000000,  150000000,  160000000,  170000000,
        180000000,  190000000,  200000000,  210000000,  220000000,  230000000,
        240000000,  250000000,  260000000,  270000000,  280000000,  290000001,
        300000001,  310000001,  320000001,  330000001,  340000001,  350000001,
        360000001,  370000001,  380000001,  390000001,  400000001,  410000001,
        420000001,  430000001,  440000001,  450000001,  460000001,  470000001,
        480000001,  490000001,  500000001,  510000001,  520000001,  530000001,
        540000001,  550000001,  560000001,  570000001,  580000002,  590000002,
        600000002,  610000002,  620000002,  630000002,  640000002,  650000002,
        660000002,  670000002,  680000002,  690000002,  700000002,  710000002,
        720000002,  730000002,  740000002,  750000002,  760000002,  770000002,
        780000002,  790000002,  800000002,  810000002,  820000002,  830000002,
        840000002,  850000002,  860000003,  870000003,  880000003,  890000003,
        900000003,  910000003,  920000003,  930000003,  940000003,  950000003,
        960000003,  970000003,  980000003,  990000003,  1000000003, 1010000003,
        1020000003, 1030000003, 1040000003, 1050000003, 1060000003, 1070000003,
        1080000003, 1090000003, 1100000003, 1110000003, 1120000003, 1130000003,
        1140000003, 1150000004, 1160000004, 1170000004, 1180000004, 1190000004,
        1200000004, 1210000004, 1220000004, 1230000004, 1240000004, 1250000004,
        1260000004, 1270000004, 1280000004, 1290000004, 1300000004, 1310000004,
        1320000004, 1330000004, 1340000004, 1350000004, 1360000004, 1370000004,
        1380000004, 1390000004, 1400000004, 1410000004, 1420000004, 1430000004,
        1440000005, 1450000005, 1460000005, 1470000005, 1480000005, 1490000005,
        1500000005, 1510000005, 1520000005, 1530000005, 1540000005, 1550000005,
        1560000005, 1570000005, 1580000005, 1590000005, 1600000005, 1610000005,
        1620000005, 1630000005, 1640000005, 1650000005, 1660000005, 1670000005,
        1680000005, 1690000005, 1700000005, 1710000005, 1720000006, 1730000006,
        1740000006, 1750000006, 1760000006, 1770000006, 1780000006, 1790000006,
        1800000006, 1810000006, 1820000006, 1830000006, 1840000006, 1850000006,
        1860000006, 1870000006, 1880000006, 1890000006, 1900000006, 1910000006,
        1920000006, 1930000006, 1940000006, 1950000006, 1960000006, 1970000006,
        1980000006, 1990000006, 2000000006,
    },
    {
        0,          10000000,   20000000,   30000000,   40000000,   50000000,
        60000000,   70000000,   80000000,   90000000,   100000000,  110000000,
        120000000,  130000000,  140000000,  150000000,  160000000,  170000000,
        180000000,  190000000,  200000000,  210000000,  220000000,  230000000,
        240000000,  250000000,  260000000,  270000000,  280000000,  290000000,
        300000000,  310000000,  320000000,  330000000,  340000000,  350000000,
        360000000,  370000000,  380000000,  390000000,  400000000,  410000000,
        420000000,  430000000,  440000000,  450000000,  460000000,  470000000,
        480000000,  490000000,  500000000,  510000000,  520000000,  530000000,
        540000000,  550000000,  560000000,  570000000,  580000000,  590000000,
        600000000,  610000000,  620000000,  630000000,  640000000,  650000000,
        660000000,  670000000,  680000000,  690000000,  700000000,  710000000,
        720000000,  730000000,  740000000,  750000000,  760000000,  770000000,
        780000000,  790000000,  800000000,  810000000,  820000000,  830000000,
        840000000,  850000000,  860000000,  870000000,  880000000,  890000000,
        900000000,  910000000,  920000000,  930000000,  940000000,  950000000,
        960000000,  970000000,  980000000,  990000000,  1000000000, 1010000000,
        1020000000, 1030000000, 1040000000, 1050000000, 1060000000, 1070000000,
        1080000000, 1090000000, 1100000000, 1110000000, 1120000000, 1130000000,
        1140000000, 1150000000, 1160000000, 1170000000, 1180000000, 1190000000,
        1200000000, 1210000000, 1220000000, 1230000000, 1240000000, 1250000000,
        1260000000, 1270000000, 1280000000, 1290000000, 1300000000, 1310000000,
        1320000000, 1330000000, 1340000000, 1350000000, 1360000000, 1370000000,
        1380000000, 1390000000, 1400000000, 1410000000, 1420000000, 1430000000,
        1440000000, 1450000000, 1460000000, 1470000000, 1480000000, 1490000000,
        1500000000, 1510000000, 1520000000, 1530000000, 1540000000, 1550000000,
        1560000000, 1570000000, 1580000000, 1590000000, 1600000000, 1610000000,
        1620000000, 1630000000, 1640000000, 1650000000, 1660000000, 1670000000,
        1680000000, 1690000000, 1700000000, 1710000000, 1720000000, 1730000000,
        1740000000, 1750000000, 1760000000, 1770000000, 1780000000, 1790000000,
        1800000000, 1810000000, 1820000000, 1830000000, 1840000000, 1850000000,
        1860000000, 1870000000, 1880000000, 1890000000, 1900000000, 1910000000,
        1920000000, 1930000000, 1940000000, 1950000000, 1960000000, 1970000000,
        1980000000, 1990000000, 2000000000,
    },
    {
        0,          10000000,   20000000,   30000000,   40000000,   50000000,
        60000000,   70000000,   80000000,   90000000,   100000000,  110000000,
        120000000,  130000000,  140000000,  150000000,  160000000,  170000000,
        180000000,  190000000,  200000000,  210000000,  220000000,  230000000,
        240000000,  250000000,  260000000,  270000000,  280000000,  290000000,
        300000000,  310000000,  320000000,  330000000,  340000000,  350000000,
        360000000,  370000000,  380000000,  390000000,  400000000,  410000000,
        420000000,  430000000,  440000000,  450000000,  460000000,  470000000,
        480000000,  490000000,  500000000,  510000000,  520000000,  530000000,
        540000000,  550000000,  560000000,  570000000,  580000000,  590000000,
        600000000,  610000000,  620000000,  630000000,  640000000,  650000000,
        660000000,  670000000,  680000000,  690000000,  700000000,  710000000,
        720000000,  730000000,  740000000,  750000000,  760000000,  770000000,
        780000000,  790000000,  800000000,  810000000,  820000000,  830000000,
        840000000,  850000000,  860000000,  870000000,  880000000,  890000000,
        900000000,  910000000,  920000000,  930000000,  940000000,  950000000,
        960000000,  970000000,  980000000,  990000000,  1000000000, 1010000000,
        1020000000, 1030000000, 1040000000, 1050000000, 1060000000, 1070000000,
        1080000000, 1090000000, 1100000000, 1110000000, 1120000000, 1130000000,
        1140000000, 1150000000, 1160000000, 1170000000, 1180000000, 1190000000,
        1200000000, 1210000000, 1220000000, 1230000000, 1240000000, 1250000000,
        1260000000, 1270000000, 1280000000, 1290000000, 1300000000, 1310000000,
        1320000000, 1330000000, 1340000000, 1350000000, 1360000000, 1370000000,
        1380000000, 1390000000, 1400000000, 1410000000, 1420000000, 1430000000,
        1440000000, 1450000000, 1460000000, 1470000000, 1480000000, 1490000000,
        1500000000, 1510000000, 1520000000, 1530000000, 1540000000, 1550000000,
        1560000000, 1570000000, 1580000000, 1590000000, 1600000000, 1610000000,
        1620000000, 1630000000, 1640000000, 1650000000, 1660000000, 1670000000,
        1680000000, 1690000000, 1700000000, 1710000000, 1720000000, 1730000000,
        1740000000, 1750000000, 1760000000, 1770000000, 1780000000, 1790000000,
        1800000000, 1810000000, 1820000000, 1830000000, 1840000000, 1850000000,
        1860000000, 1870000000, 1880000000, 1890000000, 1900000000, 1910000000,
        1920000000, 1930000000, 1940000000, 1950000000, 1960000000, 1970000000,
        1980000000, 1990000000, 2000000000,
    },
    {
        0,          10000000,   20000000,   30000000,   40000000,   50000000,
        60000000,   70000000,   80000000,   90000000,   100000000,  110000000,
        120000000,  130000000,  140000000,  150000000,  160000000,  170000000,
        180000000,  190000000,  200000000,  210000000,  220000000,  230000000,
        240000000,  250000000,  260000000,  270000000,  280000000,  290000000,
        300000000,  310000000,  320000000,  330000000,  340000000,  350000000,
        360000000,  370000000,  380000000,  390000000,  400000000,  410000000,
        420000000,  430000000,  440000000,  450000000,  460000000,  470000000,
        480000000,  490000000,  500000000,  510000000,  520000000,  530000000,
        540000000,  550000000,  560000000,  570000000,  580000000,  590000000,
        600000000,  610000000,  620000000,  630000000,  640000000,  650000000,
        660000000,  670000000,  680000000,  690000000,  700000000,  710000000,
        720000000,  730000000,  740000000,  750000000,  760000000,  770000000,
        780000000,  790000000,  800000000,  810000000,  820000000,  830000000,
        840000000,  850000000,  860000000,  870000000,  880000000,  890000000,
        900000000,  910000000,  920000000,  930000000,  940000000,  950000000,
        960000000,  970000000,  980000000,  990000000,  1000000000, 1010000000,
        1020000000, 1030000000, 1040000000, 1050000000, 1060000000, 1070000000,
        1080000000, 1090000000, 1100000000, 1110000000, 1120000000, 1130000000,
        1140000000, 1150000000, 1160000000, 1170000000, 1180000000, 1190000000,
        1200000000, 1210000000, 1220000000, 1230000000, 1240000000, 1250000000,
        1260000000, 1270000000, 1280000000, 1290000000, 1300000000, 1310000000,
        1320000000, 1330000000, 1340000000, 1350000000, 1360000000, 1370000000,
        1380000000, 1390000000, 1400000000, 1410000000, 1420000000, 1430000000,
        1440000000, 1450000000, 1460000000, 1470000000, 1480000000, 1490000000,
        1500000000, 1510000000, 1520000000, 1530000000, 1540000000, 1550000000,
        1560000000, 1570000000, 1580000000, 1590000000, 1600000000, 1610000000,
        1620000000, 1630000000, 1640000000, 1650000000, 1660000000, 1670000000,
        1680000000, 1690000000, 1700000000, 1710000000, 1720000000, 1730000000,
        1740000000, 1750000000, 1760000000, 1770000000, 1780000000, 1790000000,
        1800000000, 1810000000, 1820000000, 1830000000, 1840000000, 1850000000,
        1860000000, 1870000000, 1880000000, 1890000000, 1900000000, 1910000000,
        1920000000, 1930000000, 1940000000, 1950000000, 1960000000, 1970000000,
        1980000000, 1990000000, 2000000000,
    },
};
long long cnt[16];
bool check(long long x, long long t) {
  memset(cnt, 0, sizeof(cnt));
  while (x) {
    long long c = x & 15;
    x >>= 4;
    cnt[c]++;
    if (cnt[c] > t) return false;
  }
  return true;
}
char getChar(long long x) {
  if (x < 10) return x + '0';
  return x - 10 + 'a';
}
string getHex(long long x) {
  string res;
  while (x) {
    long long c = x % 16;
    x /= 16;
    res += getChar(c);
  }
  reverse(res.begin(), res.end());
  return res;
}
int main(void) {
  long long k, t;
  cin >> k >> t;
  long long ans = a[t][k / st[t]];
  k %= st[t];
  k++;
  while (k) {
    if (check(ans, t)) {
      k--;
      if (k == 0) break;
    }
    ans++;
  }
  cout << getHex(ans) << '\n';
  return 0;
}

### Prompt

Please provide a cpp coded solution to the problem described below:

Igor likes hexadecimal notation and considers positive integer in the hexadecimal notation interesting if each digit and each letter in it appears no more than t times. For example, if t = 3, then integers 13a13322, aaa, abcdef0123456789 are interesting, but numbers aaaa, abababab and 1000000 are not interesting.

Your task is to find the k-th smallest interesting for Igor integer in the hexadecimal notation. The integer should not contain leading zeros.

Input

The first line contains the two integers k and t (1 ≤ k ≤ 2·109, 1 ≤ t ≤ 10) — the number of the required integer and the maximum number of times some integer or letter can appear in interesting integer.

It can be shown that the answer always exists for such constraints.

Output

Print in the hexadecimal notation the only integer that is the k-th smallest interesting integer for Igor.

Examples

Input

17 1


Output

12


Input

1000000 2


Output

fca2c

Note

The first 20 interesting integers if t = 1: 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, 10, 12, 13, 14, 15. So the answer for the first example equals 12.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
struct __s {
  __s() {
    srand(time(NULL));
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    if (!1)
      fprintf(stderr, "Execution time: %.3lf s.\n",
              (double)clock() / CLOCKS_PER_SEC);
    long long n;
    cin >> n;
  }
} __S;
long long st[11] = {0,        1000000,  10000000, 10000000, 10000000, 10000000,
                    10000000, 10000000, 10000000, 10000000, 10000000};
long long a[11][2111] = {
    {},
    {
        0,           2451992,     5305560,     8229032,     11087195,
        14010395,    17140527,    22528766,    26803166,    31147471,
        35556783,    40949935,    45355167,    49699454,    55161455,
        59501615,    63841823,    68194094,    73582846,    77988335,
        82328271,    86741967,    92130191,    96479135,    100892558,
        105232703,   110620990,   114961183,   119374863,   123714797,
        129107695,   133447357,   137865679,   142270879,   147659375,
        152003710,   156352079,   161740334,   166080559,   170490639,
        174903806,   180292062,   184706527,   188980911,   193324703,
        198713471,   203123039,   207528527,   211876670,   217269790,
        221679374,   226018814,   230297839,   235755967,   240165823,
        244505471,   248850063,   254307933,   258651966,   262996558,
        270765821,   277459523,   284144468,   309916773,   316618375,
        325605818,   332298409,   341293788,   347982314,   355925229,
        363671344,   371556468,   379355732,   386188696,   395043990,
        401803450,   409680348,   417491676,   425364734,   433110578,
        440987442,   448803446,   456675991,   463430535,   472360377,
        479114665,   486996171,   494807548,   502614816,   510426418,
        517250899,   526110838,   532939672,   542918330,   549746395,
        558602221,   565430526,   588966720,   597757285,   604659318,
        613449606,   620273815,   629129641,   635958202,   643766236,
        651643134,   659458576,   667265841,   675138388,   682949989,
        689782663,   698638539,   705463259,   713278701,   721016044,
        728959297,   736704577,   744586068,   752384852,   760266375,
        767029126,   775958987,   782713308,   790525148,   798401808,
        807323732,   815200852,   821897846,   830889385,   837582232,
        846577610,   853270730,   879035134,   885728784,   893552993,
        901416770,   908184199,   917105525,   923930042,   932851403,
        939622364,   947499262,   955232784,   963114017,   970921556,
        978798982,   986605685,   994487448,   1001245063,  1009122746,
        1016930283,  1024815680,  1032548929,  1040496245,  1048237412,
        1056049303,  1063922104,  1070688953,  1080729068,  1087487740,
        1096413234,  1103115638,  1111057799,  1118795142,  1125693353,
        1134479272,  1158150859,  1166941148,  1173765357,  1182633744,
        1189326930,  1197269347,  1205011864,  1211901609,  1220700090,
        1227589596,  1236388077,  1243212797,  1251020338,  1258897234,
        1266708837,  1274515813,  1282388615,  1290204056,  1298077626,
        1304836331,  1312651772,  1320524816,  1328332081,  1336143186,
        1345143192,  1352954553,  1359779002,  1368639195,  1375393483,
        1384319742,  1391082256,  1399950658,  1406766658,  1415630727,
        1422454935,  1445995723,  1454912220,  1461683420,  1470543102,
        1477364001,  1486158625,  1492982595,  1500790406,  1508667252,
        1516486841,  1524359576,  1531119341,  1539974398,  1546811664,
        1554610209,  1562491492,  1570302787,  1578241432,  1586048935,
        1593934539,  1601741276,  1608426187,  1618539809,  1625237571,
        1633176435,  1640921684,  1648868760,  1656606343,  1663434426,
        1672290540,  1679131390,  1687978768,  1694746690,  1703667506,
        1710361223,  1734028440,  1742822569,  1749720779,  1758511050,
        1765339373,  1774199857,  1781024049,  1788826674,  1796712532,
        1804519252,  1812331160,  1820203945,  1827945914,  1834778603,
        1843634464,  1850462769,  1858274676,  1866147717,  1873959063,
        1882954440,  1890765529,  1898638555,  1906446077,  1913278787,
        1922073428,  1928897364,  1936704645,  1944515992,  1952389562,
        1960196811,  1967033308,  1975823870,  1982713616,  1991508307,
        2015179365,  2023969430,  2030863526,  2038613434,  2046481848,
        2053245933,  2062101501,  2068934176,  2077781793,  2084622693,
        2092364116,  2100307369,  2108044473,  2115986874,  2123736796,
        2131605740,  2139417360,  2146179890,  2155171683,  2162979173,
        2170864297,  2178671511,  2186545116,  2194355949,  2202172158,
        2210036752,  2216807763,  2225728818,  2232553367,  2241474743,
        2248250315,  2256122588,  2263856074,  2270622957,  2279545120,
        2303081505,  2312002354,  2318777956,  2327695188,  2334458314,
        2342330826,  2350146541,  2356896766,  2365830945,  2372593441,
        2381449812,  2388274276,  2396085366,  2403958438,  2411770281,
        2420699868,  2428581374,  2436388640,  2444191538,  2451028564,
        2458831444,  2466708615,  2474515880,  2482327226,  2490204396,
        2497950205,  2504844048,  2513635138,  2520524884,  2529319540,
        2536213605,  2545012102,  2551901623,  2560692188,  2584232446,
        2591056673,  2599846689,  2606744626,  2615539267,  2622429302,
        2631219847,  2638113704,  2645855946,  2653732826,  2661548593,
        2669425746,  2676184162,  2686223989,  2692990870,  2700728198,
        2708671707,  2716417243,  2724298493,  2732101681,  2739982948,
        2747789908,  2754619288,  2763470488,  2770303161,  2778118364,
        2785987035,  2793733357,  2801606176,  2808369202,  2817286467,
        2824061558,  2832982885,  2839742411,  2848663256,  2872207853,
        2878893310,  2887892528,  2894589729,  2903650422,  2910335333,
        2919330968,  2926023608,  2933888135,  2941708235,  2949519323,
        2958511393,  2966318386,  2974199635,  2980962405,  2989884585,
        2996647080,  3004528348,  3012326893,  3020146942,  3027953936,
        3035761747,  3043634755,  3051450228,  3058278535,  3067134616,
        3073962698,  3082823149,  3089581822,  3097450256,  3105270834,
        3112094258,  3120954724,  3127779189,  3136573592,  3160240553,
        3169030874,  3175801852,  3183675169,  3191482433,  3198310723,
        3207167060,  3213995365,  3223973767,  3230806491,  3238613997,
        3246421246,  3254228256,  3262101297,  3269916739,  3277789814,
        3285601159,  3292429720,  3300237224,  3308118202,  3315860222,
        3323802912,  3331544865,  3339421251,  3347233108,  3355039828,
        3361869225,  3370724775,  3377557467,  3386343678,  3393245985,
        3400987425,  3408930661,  3415619412,  3441387637,  3448085110,
        3457001863,  3463773097,  3472563625,  3479458080,  3487195697,
        3496260979,  3502957924,  3511945640,  3518642327,  3527637962,
        3534322923,  3542204156,  3550015521,  3557963126,  3565761125,
        3573646999,  3581453462,  3589252743,  3596089786,  3603896762,
        3611704574,  3619577616,  3627397186,  3635208515,  3643081863,
        3649840246,  3658770361,  3665520073,  3674450156,  3681151228,
        3690073137,  3696832305,  3705757780,  3729297765,  3736118134,
        3744982168,  3751814841,  3761789404,  3768543452,  3777473584,
        3784162354,  3792108884,  3799855238,  3807732120,  3815539369,
        3822364089,  3831224010,  3837987069,  3845859856,  3853675569,
        3861548355,  3869359956,  3877236870,  3885048762,  3892921291,
        3899679964,  3908474076,  3915364112,  3923114017,  3931052883,
        3938794852,  3946671989,  3953430663,  3962294680,  3969123291,
        3977983484,  3984807696,  4010440754,  4017269059,  4023957827,
        4034076056,  4040769159,  4049764555,  4056453851,  4065379565,
        4072138000,  4081068389,  4087826770,  4095638117,  4103515253,
        4111318151,  4119129513,  4125892794,  4134818285,  4141576976,
        4149458465,  4157265202,  4165143158,  4172949861,  4180831400,
        4188564919,  4196515529,  4203208924,  4212274496,  4218958881,
        4227954260,  4234646851,  4242445908,  4250331527,  4257094023,
        4266015930,  4272709049,  4337544295,  4351576424,  4364843371,
        4376918074,  4391019511,  4405257176,  4418383816,  4432625337,
        4444560485,  4458801767,  4471929175,  4486105402,  4500203048,
        4512342999,  4525408999,  4539645878,  4553747845,  4837604504,
        4848441976,  4896299608,  4910401336,  4924704571,  4937708521,
        4949914600,  4963942037,  4978183846,  4991249831,  5005491303,
        5019593064,  5031671624,  5044925961,  5059032054,  5073268936,
        5087383207,  5098470550,  5113621878,  5144705912,  5175597673,
        5188856107,  5200721416,  5215028473,  5229138136,  5242269637,
        5256433030,  5268581783,  5282683239,  5295806534,  5309978152,
        5324220170,  5337286137,  5349351622,  5363523222,  5378883239,
        5409840552,  5421910648,  5434960232,  5465913385,  5480093451,
        5493281528,  5506466538,  5519457958,  5533699750,  5546822501,
        5560994953,  5574125912,  5587314745,  5600359687,  5614543864,
        5628649672,  5644074951,  5671738519,  5685984391,  5700094841,
        5714397239,  5745211706,  5757421578,  5770482664,  5784654054,
        5798821558,  5812010647,  5825142151,  5838129222,  5852367208,
        5865490216,  5879670281,  5892788967,  5908218858,  5920153511,
        5951172245,  5965273973,  5978533002,  5990484553,  6004717353,
        6035596296,  6049903351,  6061859560,  6076092341,  6089141381,
        6103317877,  6116510551,  6129633335,  6143871322,  6156862728,
        6170055399,  6185345750,  6216290249,  6229421736,  6241566104,
        6255602006,  6269839945,  6284007722,  6312871178,  6325990358,
        6340096216,  6354329236,  6367399572,  6380579429,  6394825576,
        6407883078,  6421005606,  6435243578,  6449484793,  6480441577,
        6492442261,  6506679975,  6520855926,  6533921897,  6547106119,
        6560234059,  6574330889,  6605292278,  6617428165,  6631600071,
        6644723093,  6658829156,  6672021317,  6685080137,  6699251241,
        6714611242,  6726759912,  6757568743,  6771740614,  6784999045,
        6798052776,  6811175783,  6825355335,  6839592230,  6851602187,
        6882616055,  6895747815,  6909783924,  6922972806,  6936091508,
        6950337127,  6963390278,  6976517928,  6991803688,  7021712375,
        7035880152,  7049076679,  7062125701,  7076305764,  7089433720,
        7102614328,  7116732233,  7129781254,  7144092919,  7172870374,
        7187111861,  7201221749,  7214480519,  7227398214,  7240660806,
        7255946808,  7286966282,  7298974967,  7313146071,  7326269061,
        7340441255,  7353568373,  7367744088,  7380863046,  7394969385,
        7407109126,  7421289206,  7452246760,  7465291413,  7478480501,
        7491541588,  7505853048,  7521073496,  7550056537,  7564031239,
        7577293560,  7591395558,  7604518823,  7617641861,  7631813511,
        7644997957,  7658068278,  7672301368,  7686477577,  7699526389,
        7711613142,  7742623381,  7756795286,  7770901093,  7782971461,
        7797361000,  7828170554,  7842346537,  7855534823,  7868736233,
        7881715620,  7895957125,  7909079892,  7923260281,  7936374854,
        7950546471,  7962625319,  7976801016,  7990903014,  8021983126,
        8032815733,  8047119222,  8062343766,  8093423944,  8106494041,
        8119608585,  8132727510,  8146907334,  8161083320,  8174267813,
        8187460726,  8200386885,  8214693975,  8227747112,  8241989128,
        8255055095,  8268239031,  8281288580,  8312306821,  8327539591,
        8358624137,  8369440582,  8383747880,  8397858313,  8412168937,
        8425152711,  8437222804,  8451402885,  8465570932,  8478697542,
        8492935238,  8506202185,  8519115784,  8532308966,  8546484935,
        8560729511,  8610619047,  8621706119,  8652593784,  8666839914,
        8680941625,  8694130714,  8706077944,  8720318953,  8734486453,
        8747609511,  8761789575,  8773860184,  8788023110,  8801154872,
        8815331097,  8829572087,  8841437622,  8854695317,  8870129320,
        8917785974,  8931826569,  8942991993,  8957163850,  8971261192,
        8985502968,  8998629609,  9012871112,  9024802165,  9039047542,
        9052174951,  9066351177,  9080448840,  9092589064,  9105654775,
        9119891671,  9403547558,  9417850279,  9428687751,  9476545383,
        9490647111,  9504950603,  9517959451,  9530160375,  9544192455,
        9558429638,  9571495607,  9585728886,  9597938296,  9611909207,
        9625171993,  9639273735,  9653510616,  9667699177,  9679834807,
        9693933190,  9724951687,  9755835273,  9768053593,  9780967192,
        9795274266,  9809383911,  9822580966,  9835630230,  9848823463,
        9862933639,  9876052822,  9890228567,  9904461881,  9916614410,
        9929597414,  9944953304,  9959129015,  9990086328,  10001104263,
        10015206008, 10046224712, 10060339227, 10073523209, 10086712570,
        10099704007, 10113945524, 10127068532, 10141306262, 10154371704,
        10167560519, 10180605463, 10194785801, 10210084090, 10223272168,
        10251988920, 10266221975, 10280340887, 10294643271, 10323360329,
        10336618810, 10350728458, 10364899829, 10378019304, 10391207847,
        10405387943, 10418366804, 10431564408, 10445735991, 10459916313,
        10474149401, 10486367738, 10500399304, 10531418053, 10545519765,
        10557726104, 10570734730, 10584963125, 10615846457, 10629100810,
        10642101240, 10655289574, 10669387157, 10682515077, 10696756325,
        10709879110, 10724117097, 10736059928, 10751419929, 10765591542,
        10795487466, 10808618935, 10821811878, 10835905124, 10850081881,
        10862156345, 10893116954, 10906232087, 10920342006, 10934579686,
        10946723748, 10960829590, 10974022774, 10988124758, 11001251381,
        11016607835, 11029731082, 11060752888, 11072688326, 11086925751,
        11101097606, 11114167685, 11127351894, 11140479834, 11154642455,
        11185538055, 11197673941, 11211845864, 11224968869, 11239074932,
        11252258900, 11265391446, 11280685912, 11294857032, 11306993481,
        11337814519, 11350946023, 11365244820, 11378364088, 11391421557,
        11405597526, 11418789429, 11431843899, 11462862088, 11475989495,
        11490029717, 11502165942, 11516337284, 11530583157, 11544754535,
        11557882200, 11571000888, 11601958153, 11616130553, 11628273896,
        11642375846, 11656552052, 11669671302, 11682860135, 11696973911,
        11710027030, 11724330504, 11753116150, 11767357671, 11781463941,
        11794726295, 11807644004, 11822020967, 11836192838, 11867212058,
        11879220761, 11893387767, 11906515415, 11920687029, 11933814165,
        11946941285, 11961113191, 11974166582, 11987359287, 12001534983,
        12032493048, 12045537462, 12057677717, 12071852900, 12087213208,
        12101319272, 12130302312, 12143228439, 12157531913, 12171641334,
        12184830184, 12197887637, 12212059286, 12225243988, 12238309958,
        12252547159, 12265674809, 12279837702, 12291858933, 12322877895,
        12337041062, 12352335255, 12364335717, 12377606776, 12408481863,
        12422592569, 12435781128, 12448977913, 12461961429, 12476202901,
        12489325684, 12503563399, 12516620630, 12529743670, 12542871095,
        12557043209, 12571148790, 12601180343, 12613127045, 12628483478,
        12642589541, 12673669719, 12686744185, 12698806041, 12712977944,
        12727149013, 12740280537, 12754513589, 12767706502, 12780628564,
        12793891687, 12807993397, 12822230808, 12835296824, 12847436263,
        12861534405, 12911566775, 12925672872, 12954664361, 12967582311,
        12981889352, 12995995722, 13009257755, 13022246119, 13035364806,
        13049614263, 13062663861, 13076909446, 13091076711, 13104343673,
        13116208680, 13130450456, 13144626408, 13159989994, 13187719095,
        13201952151, 13232835719, 13247085706, 13260138824, 13273327946,
        13286319625, 13300560633, 13313683670, 13327921077, 13340986775,
        13354101893, 13367220310, 13381400646, 13395581258, 13409814026,
        13423138553, 13436065000, 13450375112, 13498031782, 13512072344,
        13523229577, 13537409625, 13551572504, 13565748746, 13578867960,
        13591019753, 13605048213, 13619293574, 13632412534, 13646662489,
        13658597463, 13672830744, 13685900808, 13969691383, 13983793368,
        13998096055, 14042627769, 14056787062, 14070897272, 14085196377,
        14098201131, 14110402072, 14124438263, 14138740967, 14151741383,
        14165974662, 14178184071, 14192154983, 14205417768, 14219519511,
        14234875930, 14246896889, 14260080856, 14274178966, 14305197462,
        14336076952, 14347250792, 14361212966, 14375520042, 14389634842,
        14402826742, 14415880664, 14429069239, 14443179415, 14456294500,
        14470470247, 14483659112, 14497978955, 14510957848, 14525199080,
        14539374824, 14570332104, 14581350039, 14595451783, 14626466392,
        14640585511, 14652720920, 14665910043, 14679949783, 14694191333,
        14707310212, 14721552037, 14734621848, 14747806551, 14760855623,
        14776150089, 14790329867, 14803517944, 14832300249, 14846468006,
        14860586662, 14874885460, 14903606121, 14916864600, 14930970138,
        14945203206, 14958265080, 14971453656, 14984585141, 14998612836,
        15011810181, 15025982038, 15040363078, 15054395177, 15066613531,
        15080649977, 15111667942, 15125770166, 15137971879, 15151046054,
        15165208901, 15196092230, 15208293913, 15222347274, 15235535606,
        15249703383, 15262822293, 15276998053, 15290120804, 15305481354,
        15317424199, 15331665704, 15345833223, 15375799034, 15387816152,
        15402057669, 15416150900, 15430327653, 15442406490, 15473362726,
        15486482248, 15500584199, 15513776886, 15526969573, 15541075366,
        15554268550, 15567321957, 15582615638, 15595801448, 15609976857,
        15638902537, 15652934118, 15667171560, 15680294837, 15693364884,
        15706544997, 15720721512, 15734888230, 15763686679, 15777915911,
        15792087543, 15805219543, 15818268548, 15832509557, 15846755702,
        15860931704, 15873005655, 15887239257, 15918061064, 15931187703,
        15944442071, 15957561288, 15971667333, 15985843301, 15997986629,
        16012089672, 16042059544, 16056231192, 16069357989, 16082411735,
        16096583060, 16111943318, 16123947638, 16138127975, 16151251287,
        16182269463, 16196372522, 16208515832, 16222621911, 16235749252,
        16249917094, 16263105910, 16276298599, 16290272805, 16304576296,
        16333362183, 16347603447, 16360661158, 16376090552, 16388090757,
        16402267253, 16416438614, 16447449705, 16459466537, 16473633800,
        16486765816, 16500998374, 16514064310, 16527183477, 16541354870,
        16554412374, 16567605062, 16581781015, 16611809033, 16625783238,
        16637923526, 16653213573, 16667454888, 16681565062, 16710548088,
        16723474214, 16737773593, 16751887369, 16765075960, 16778203847,
        16791252901, 16805489780, 16818555732, 16832797304, 16845920583,
        16860087847, 16872096774, 16903120087, 16918409688, 16932581047,
        16943532917, 16957840263, 16988727895, 17002838344, 17014974232,
        17029220378, 17042203109, 17056448726, 17069567364, 17083805079,
        17096866405, 17109985350, 17123116870, 17137289241, 17151395079,
        17200440824, 17212527577, 17226624951, 17240800919, 17271811206,
        17283832986, 17296947512, 17311119417, 17325356311, 17338422010,
        17351606759, 17365847975, 17378770037, 17392024967, 17406134870,
        17420437816, 17433438297, 17445574425, 17460794359, 17491812568,
        17505914552, 17534910136, 17547893622, 17562135127, 17576246121,
        17589500203, 17602496298, 17615610582, 17629860072, 17642975173,
        17657151126, 17670273910, 17683540873, 17696454710, 17710696232,
        17725986618, 17740301306, 17767965160, 17782198183, 17813081495,
        17827323304, 17840384872, 17852525145, 17866626873, 17880802570,
        17893929446, 17908166871, 17921236920, 17934347669, 17947470710,
        17961646678, 17975827049, 17991178282, 18002335786, 18016306680,
        18030620905, 18078277558, 18091269800, 18103475352, 18117651337,
        18131818278, 18144945946, 18159113993, 18171265785, 18185294022,
        18198491029, 18212658326, 18226904213, 18238843239, 18252027942,
        18535770426, 18549933579, 18564043769, 18575196649, 18622873545,
        18637033107, 18651143302, 18664393577, 18676349802, 18690643752,
        18704684552, 18717938423, 18731987177, 18744123302, 18758425751,
        18771352182, 18785663544, 18800883767, 18815187242, 18826090506,
        18840326631, 18854424791, 18885443251, 18916327097, 18927492469,
        18941598584, 18955765815, 18969876521, 18983064328, 18995077880,
        19009315304, 19023421351, 19036605811, 19050716021, 19065023369,
        19078224730, 19091203624, 19105445385, 19119612408, 19149660393,
        19161595813, 19175697555, 19206712165, 19220827189, 19232966694,
        19246155834, 19260336170, 19274437109, 19287564742, 19300749237,
        19313814952, 19329166710, 19342219879, 19356461399, 19370572315,
        19383760393, 19412546281, 19426713815, 19440828341, 19455131235,
        19483851894, 19497106279, 19511212326, 19525444886, 19538511130,
        19551695335, 19564830934, 19578858611, 19592056213, 19607416199,
        19620609110, 19634645608, 19646851162, 19660895754, 19691913718,
        19704967383, 19717169078, 19731283638, 19745451091, 19776338006,
        19788539958, 19802588954, 19815773447, 19829949159, 19843068102,
        19856195251, 19871485317, 19884674455, 19897669991, 19911907382,
        19925030423, 19956045323, 19968066297, 19982303718, 19996401557,
        20010573429, 20022652293, 20052559958, 20066793559, 20080829975,
        20094022920, 20107215349, 20121321944, 20135632807, 20148751766,
        20162914661, 20176047224, 20190222632, 20219144217, 20233175815,
        20247417592, 20260540630, 20273672131, 20286790773, 20300967286,
        20315138391, 20343924261, 20358166056, 20371285512, 20385530855,
        20398514373, 20412825238, 20426997398, 20441177479, 20453251431,
        20467485032, 20497381144, 20511433992, 20524687862, 20537807081,
        20551909013, 20566085235, 20578228563, 20592400984, 20622305335,
        20636476968, 20648547078, 20662657510, 20678021863, 20692189094,
        20704197783, 20718369654, 20731497063, 20762511142, 20775569722,
        20788762121, 20802867686, 20815995077, 20829114294, 20843347590,
        20856544374, 20870514485, 20882724919, 20913608215, 20927849224,
        20942025415, 20955288281, 20968336789, 20982513029, 20996676197,
        21025598328, 21039716952, 21052830999, 21067007529, 21080191478,
        21094310103, 21107429253, 21121600646, 21133605989, 21147851350,
        21162018598, 21192054841, 21203931911, 21219353319, 21233459382,
        21247696568, 21259713686, 21290794118, 21303781430, 21318019384,
        21331084569, 21344273673, 21358454248, 21371498694, 21385739925,
        21398867299, 21413038983, 21426166375, 21439285046, 21452342550,
        21502375979, 21516551161, 21529805289, 21541674646, 21555981992,
        21586869380, 21600979817, 21613115719, 21627357755, 21640410136,
        21654590199, 21667713752, 21680897975, 21695007894, 21708126820,
        21721328248, 21735492151, 21750790474, 21780686601, 21792769769,
        21806870760, 21821046727, 21852056980, 21864132009, 21877189192,
        21891365191, 21905602087, 21918660619, 21931852535, 21945045736,
        21959016068, 21972270743, 21986380644, 21999635048, 22013753977,
        22026938682, 22041040392, 22072058359, 22086169066, 22114107336,
        22128143767, 22142380900, 22156491897, 22169745976, 22182742089,
        22195856391, 22210101752, 22223220966, 22237396902, 22250519686,
        22263778456, 22276700486, 22292126024, 22306228554, 22320544011,
        22348210936, 22362443976, 22393327271, 22407564982, 22419582070,
        22432770919, 22446877288, 22461048601, 22474180120, 22488412647,
        22500434153, 22514593444, 22527716742, 22541953892, 22557191322,
        22569327208, 22582581562, 22596552473, 22610866681, 22658523367,
        22669615032, 22683721127, 22697884823, 22712060470, 22725191975,
        22737262633, 22751507978, 22765605334, 22778736838, 22792908727,
        22807149987, 23088713112, 23101827655, 23116008057, 23130244889,
        23144290058, 23155442681, 23203119594, 23217278883, 23231389332,
        23244639364, 23256661129, 23270889527, 23284930328, 23298184200,
        23312232953, 23324369095, 23338671780, 23351663492, 23367019924,
        23381129798, 23394384440, 23406340683, 23420568586, 23434674936,
        23465755112, 23494475721, 23507734180, 23521844358, 23536011590,
        23549069624, 23562261528, 23575324169, 23589561336, 23602618568,
        23616851603, 23632080294, 23644220567, 23657421930, 23671449398,
        23685691161, 23699858954, 23727809015, 23741841622, 23755943331,
        23786962598, 23800016195, 23813216839, 23826401607, 23840581946,
        23853626118, 23867806454, 23880995031, 23895179208, 23908363910,
        23922465654, 23936703079, 23949769514, 23961909016, 23992792842,
        24006959607, 24021074150, 24033279907, 24063180163, 24077352054,
        24091458100, 24104642084, 24117708330, 24131946266, 24145076710,
        24160429016, 24173420470, 24187661975, 24200846692, 24213842808,
        24227096936, 24241141785, 24272212743, 24285213158, 24297414887,
        24311529414, 24325688675, 24356583780, 24368785734, 24381917479,
        24396019239, 24410194968, 24423313878, 24437563878, 24451731092,
        24464920231, 24478055832, 24492153414, 24505280567, 24536291369,
        24548312586, 24562549494, 24576651462, 24589901700, 24602898068,
        24632794468, 24647039335, 24661075766, 24673220120, 24687452934,
        24702817273, 24715878616, 24728997540, 24742112628, 24756292998,
        24770460280, 24799390007, 24813417495, 24827663369, 24840790775,
        24853917924, 24867041174, 24881213062, 24895384180, 24924170036,
        24938412086, 24951531288, 24966895386, 24979878646, 24993071848,
        25007243174, 25021423271, 25033489014, 25047730808, 25077626919,
        25091679768, 25103876871, 25118053368, 25132155062, 25145282451,
        25158470243, 25172646772, 25202555496, 25216722742, 25228797479,
        25244022296, 25258267639, 25271386327, 25284509095, 25297562758,
        25311743094, 25342757172, 25354766953, 25369003817, 25383113735,
        25396302324, 25409360087, 25422544790, 25436790148, 25450752067,
        25462970695, 25493849894, 25509279273, 25522263560, 25535529960,
        25548587463, 25562758804, 25576926358, 25605844103, 25620028264,
        25633076772, 25647253305, 25660437512, 25673503207, 25687675078,
        25700797846, 25713917300, 25728097124, 25741215798, 25791314810,
        25803192377, 25817494809, 25831600855, 25845903850, 25857855159,
        25888935589, 25901918804, 25916161111, 25929296711, 25942415144,
        25956653130, 25969640183, 25982833127, 25997004692, 26010131880,
        26024303751, 26036378199, 26051602503, 26082621771, 26096796938,
        26109002489, 26121920695, 26136227768, 26167106964, 26180177300,
        26193361495, 26206554969, 26220655912, 26233787400, 26247963897,
        26261147880, 26275258295, 26287324276, 26301566087, 26316856440,
        26331036249, 26358835273, 26373003274, 26387116536, 26401292520,
        26430205860, 26444373689, 26457430900, 26471610967, 26484799285,
        26498906394, 26512098569, 26525287416, 26538344887, 26552516533,
        26566626452, 26580999303, 26594004122, 26607180360, 26621290569,
        26652370184, 26666411258, 26694353129, 26708389557, 26722626932,
        26736729479, 26748943176, 26762070360, 26776102167, 26790340361,
        26803466741, 26817642712, 26829712789, 26845142713, 26858130293,
        26872371800, 26886474329, 26899741211, 26928457497, 26942689783,
        26973577705, 26987872197, 26999832231, 27013016693, 27027123064,
        27041290279, 27054421800, 27067609864, 27080741369, 27094839493,
        27107962517, 27123318148, 27137424809, 27149572984, 27162827337,
        27176863785, 27191097354, 27238769140, 27249860825, 27263966903,
        27278130596, 27292306499, 27305437748, 27317512825, 27331754026,
        27345855512, 27358982612, 27373154520, 27654852548, 27668958888,
        27682073428, 27696253833, 27710490917, 27724536090, 27735689242,
        27783353082, 27797524708, 27811635108, 27822787988, 27836894616,
        27851135557, 27865176101, 27878429992, 27892466442, 27904614869,
        27920036311, 27933097655, 27947261604, 27961380213, 27973581639,
        27986582394, 28000810265, 28014920713, 28046000885, 28073672938,
        28087975860, 28102090389, 28116257364, 28129315671, 28141459236,
        28155631385, 28169807129, 28182860263, 28198216149, 28211277748,
        28224462247, 28237659557, 28251760709, 28265936933, 28280109099,
        28308046603, 28322092023, 28336325077, 28367208373, 28379340403,
        28392414068, 28406647383, 28420823624, 28433871893, 28448052231,
        28462359544,
    },
    {
        0,          10684262,   21818416,   32917177,   44262765,   55595204,
        66693165,   78038807,   89139198,   100469239,  111816120,  122914223,
        134269578,  145603427,  156702159,  168047800,  179380159,  190478181,
        201823788,  212922519,  224267412,  235599831,  246698541,  258044152,
        269780437,  281416441,  296280998,  309579622,  321325881,  333047046,
        345027197,  356773364,  368520257,  380499710,  392233770,  404098466,
        415959757,  427706651,  439699964,  451420486,  463171190,  475160646,
        486906872,  498626738,  510620047,  522613361,  534099948,  546333503,
        558332881,  569819609,  585648774,  597983741,  609963160,  621464362,
        633431318,  645437098,  657100413,  668903165,  680883315,  692630874,
        704363821,  716353279,  728090918,  739837175,  751810100,  763563491,
        775542916,  787175732,  799024572,  811262581,  822764405,  834730006,
        846735643,  860021788,  874395030,  886386589,  898366708,  910085237,
        921834159,  933826755,  945573646,  957308010,  969286829,  981033663,
        992780554,  1004753661, 1016494405, 1028477722, 1040230483, 1051963925,
        1063947095, 1075941048, 1087683968, 1099666729, 1111400425, 1123134150,
        1135127321, 1149386105, 1163070787, 1174791402, 1186770221, 1198504555,
        1210251212, 1222230873, 1233977796, 1245712823, 1257690946, 1269425303,
        1281417960, 1293166531, 1304897885, 1316877975, 1328625324, 1340365139,
        1352596941, 1364378737, 1376100658, 1388070218, 1400037167, 1411546806,
        1423530778, 1438753836, 1451693779, 1463196248, 1475161146, 1487141297,
        1498697638, 1510640740, 1522614507, 1534348094, 1546108292, 1558087042,
        1569821538, 1581566217, 1593534595, 1605280920, 1617429429, 1629213766,
        1641000456, 1652990524, 1664644268, 1676460561, 1688441288, 1699992569,
        1712143804, 1728118380, 1740095962, 1751765127, 1763578803, 1775545444,
        1787292318, 1799040470, 1811018040, 1822752352, 1834512412, 1846491865,
        1858225593, 1870217548, 1882202761, 1893945227, 1905937240, 1917671604,
        1929414230, 1941386514, 1953144784, 1964878491, 1976844135, 1988849952,
        2001511563, 2016510075, 2028491580, 2040469176, 2051982610, 2063962761,
        2075830294, 2087443295, 2099433413, 2111249439, 2123148467, 2134890856,
        2146675283, 2158868089, 2170602514, 2182362601, 2194328495, 2206075084,
        2217809156, 2229788211, 2241780828, 2253281995, 2265262149, 2277254069,
        2291924674, 2304913551, 2316906199, 2328885144, 2340385516, 2352366215,
        2364345672, 2376092591, 2387826724,
    },
    {
        0,          10030150,   20103656,   30157030,   40244418,   50297965,
        60385397,   70439739,   80526333,   90614472,   100668684,  110755406,
        120809620,  130896121,  140950599,  151038030,  161116876,  171178966,
        181265157,  191319683,  201407250,  211460440,  221547962,  231602494,
        241688675,  251776153,  261829432,  271989918,  282063980,  292616461,
        302977822,  313117791,  323260113,  333334566,  343475818,  353567409,
        363691300,  373801023,  383908068,  394043942,  404144704,  414264322,
        424373242,  434480336,  444588680,  454721902,  464810971,  474945495,
        485052554,  495162278,  505299376,  515377716,  525519012,  535593155,
        545767448,  555878902,  565984222,  576499622,  586890963,  597037907,
        607145131,  617253388,  627393572,  637468872,  647611330,  657719847,
        667826941,  677935677,  688044872,  698180067,  708292150,  718399203,
        728508876,  738617307,  748724322,  758864369,  768947731,  779081055,
        789189533,  799297918,  809469221,  819546310,  829687563,  839763042,
        849903045,  860382858,  870773491,  880955568,  891033580,  901173590,
        911280644,  921389030,  931529034,  941605805,  951745765,  961854240,
        971962545,  982070961,  992180335,  1002316827, 1012427749, 1022534801,
        1032643231, 1042752902, 1052860006, 1062999967, 1073083997, 1083249728,
        1093358126, 1103466468, 1113605206, 1123681908, 1133823097, 1143993474,
        1154643087, 1164875683, 1174953745, 1185091122, 1195169228, 1205308922,
        1215416328, 1225526002, 1235664719, 1245742464, 1255881405, 1265989875,
        1276098180, 1286205320, 1296326511, 1306453590, 1316563346, 1326671823,
        1336778785, 1346921504, 1357028556, 1367168551, 1377246621, 1387384044,
        1397493678, 1407602065, 1417740779, 1427876682, 1438525577, 1448756589,
        1458870029, 1469011242, 1479089343, 1489226775, 1499333863, 1509443493,
        1519551925, 1529661611, 1539800314, 1549908703, 1560015757, 1570125435,
        1580233910, 1590340914, 1600481895, 1610581777, 1620731932, 1630840372,
        1640947378, 1651080615, 1661165091, 1671304158, 1681382264, 1691519685,
        1701657188, 1711759211, 1722407491, 1732650232, 1742790142, 1752899821,
        1763006957, 1773146966, 1783223735, 1793362404, 1803472083, 1813580471,
        1823687566, 1833796307, 1843935913, 1854044346, 1864152688, 1874261038,
        1884402460, 1894509476, 1904649558, 1914727222, 1924866335, 1934975574,
        1945083019, 1955224317, 1965299797, 1975439798, 1985517950, 1995655283,
        2006276380, 2016569050, 2026710300,
    },
    {
        0,          10000760,   20004106,   30005636,   40009442,   50010968,
        60014778,   70016361,   80020114,   90023745,   100025446,  110029200,
        120030832,  130034534,  140036168,  150039866,  160041504,  170045254,
        180048957,  190050532,  200054284,  210055864,  220059638,  230061197,
        240065010,  250066953,  260070343,  270078258,  280080967,  290127491,
        300151151,  310160647,  320164604,  330169581,  340175777,  350178516,
        360185246,  370187504,  380194121,  390198618,  400203055,  410207553,
        420212049,  430218662,  440223159,  450227596,  460232092,  470236590,
        480241026,  490247699,  500250071,  510256632,  520261189,  530265567,
        540274531,  550276685,  560283408,  570285610,  580342938,  590360914,
        600365405,  610372019,  620374339,  630381009,  640385264,  650389945,
        660394442,  670398880,  680405436,  690409514,  700414484,  710418982,
        720423419,  730427915,  740432558,  750436791,  760443523,  770447900,
        780452456,  790456894,  800461390,  810470237,  820472559,  830479173,
        840481553,  850488107,  860534741,  870558168,  880567900,  890570222,
        900576834,  910581337,  920585768,  930591802,  940594704,  950601374,
        960605813,  970610308,  980614746,  990619252,  1000623740, 1010630234,
        1020634848, 1030639345, 1040643842, 1050648279, 1060654528, 1070657213,
        1080666121, 1090668444, 1100675054, 1110679546, 1120683934, 1130690660,
        1140692863, 1150750142, 1160765985, 1170772658, 1180777158, 1190781591,
        1200788205, 1210790585, 1220797139, 1230801694, 1240806131, 1250810628,
        1260815126, 1270821681, 1280826235, 1290830672, 1300835168, 1310839606,
        1320844043, 1330850715, 1340852977, 1350861885, 1360866251, 1370870875,
        1380875316, 1390879812, 1400886424, 1410888806, 1420895359, 1430908260,
        1440964298, 1450975152, 1460977416, 1470984086, 1480986408, 1490993020,
        1500997464, 1511001956, 1521006920, 1531010891, 1541017502, 1551021999,
        1561026496, 1571030933, 1581035429, 1591039909, 1601046539, 1611052791,
        1621057707, 1631062263, 1641066642, 1651072965, 1661075636, 1671082308,
        1681084560, 1691091182, 1701095911, 1711100115, 1721157240, 1731173239,
        1741179909, 1751182231, 1761188845, 1771193404, 1781197837, 1791204391,
        1801206771, 1811213325, 1821217881, 1831222323, 1841226815, 1851231313,
        1861237925, 1871242419, 1881249095, 1891253531, 1901258028, 1911262465,
        1921269137, 1931271459, 1941278072, 1951282453, 1961287005, 1971293671,
        1981296058, 1991302612, 2001315509,
    },
    {
        0,          10000008,   20000096,   30000114,   40000208,   50000226,
        60000320,   70000339,   80000432,   90000522,   100000544,  110000637,
        120000656,  130000749,  140000768,  150000861,  160000880,  170000973,
        180001065,  190001085,  200001178,  210001197,  220001290,  230001309,
        240001402,  250001427,  260001514,  270001751,  280001787,  290004429,
        300005186,  310005454,  320005544,  330005659,  340005766,  350005863,
        360006040,  370006069,  380006246,  390006348,  400006451,  410006553,
        420006656,  430006833,  440006935,  450007038,  460007140,  470007244,
        480007345,  490007523,  500007550,  510007727,  520007828,  530007932,
        540008183,  550008212,  560008388,  570008417,  580011412,  590011977,
        600012085,  610012261,  620012290,  630012466,  640012559,  650012671,
        660012774,  670012876,  680012989,  690013082,  700013257,  710013360,
        720013462,  730013566,  740013668,  750013771,  760013947,  770014050,
        780014152,  790014256,  800014357,  810014610,  820014638,  830014815,
        840014843,  850015019,  860017595,  870018357,  880018686,  890018715,
        900018891,  910018992,  920019096,  930019199,  940019302,  950019478,
        960019574,  970019683,  980019786,  990019889,  1000019991, 1010020152,
        1020020211, 1030020373, 1040020474, 1050020578, 1060020680, 1070020783,
        1080021034, 1090021063, 1100021239, 1110021337, 1120021445, 1130021622,
        1140021650, 1150024590, 1160025141, 1170025317, 1180025420, 1190025521,
        1200025698, 1210025727, 1220025903, 1230026006, 1240026108, 1250026211,
        1260026314, 1270026419, 1280026589, 1290026695, 1300026798, 1310026902,
        1320027003, 1330027172, 1340027208, 1350027461, 1360027489, 1370027665,
        1380027767, 1390027870, 1400028046, 1410028076, 1420028251, 1430028574,
        1440031526, 1450031917, 1460031948, 1470032124, 1480032153, 1490032329,
        1500032432, 1510032535, 1520032637, 1530032739, 1540032915, 1550033018,
        1560033120, 1570033223, 1580033326, 1590033429, 1600033604, 1610033641,
        1620033885, 1630033989, 1640034090, 1650034194, 1660034295, 1670034473,
        1680034501, 1690034678, 1700034710, 1710034882, 1720037757, 1730038373,
        1740038549, 1750038578, 1760038754, 1770038857, 1780038960, 1790039136,
        1800039165, 1810039341, 1820039444, 1830039547, 1840039649, 1850039752,
        1860039854, 1870040031, 1880040208, 1890040311, 1900040413, 1910040516,
        1920040620, 1930040722, 1940040897, 1950040927, 1960041102, 1970041206,
        1980041308, 1990041485, 2000041741,
    },
    {
        0,          10000000,   20000001,   30000001,   40000002,   50000002,
        60000003,   70000003,   80000004,   90000005,   100000005,  110000006,
        120000006,  130000007,  140000007,  150000008,  160000008,  170000009,
        180000010,  190000010,  200000011,  210000011,  220000012,  230000012,
        240000013,  250000013,  260000014,  270000017,  280000017,  290000097,
        300000107,  310000110,  320000111,  330000112,  340000113,  350000114,
        360000116,  370000116,  380000118,  390000119,  400000120,  410000121,
        420000122,  430000124,  440000125,  450000126,  460000127,  470000128,
        480000129,  490000131,  500000131,  510000133,  520000134,  530000135,
        540000138,  550000138,  560000140,  570000140,  580000224,  590000232,
        600000233,  610000235,  620000235,  630000237,  640000238,  650000239,
        660000240,  670000241,  680000242,  690000243,  700000245,  710000246,
        720000247,  730000248,  740000249,  750000250,  760000252,  770000253,
        780000254,  790000255,  800000256,  810000259,  820000259,  830000261,
        840000261,  850000263,  860000342,  870000352,  880000356,  890000356,
        900000358,  910000359,  920000360,  930000361,  940000362,  950000364,
        960000365,  970000366,  980000367,  990000368,  1000000369, 1010000371,
        1020000371, 1030000373, 1040000374, 1050000375, 1060000376, 1070000377,
        1080000380, 1090000380, 1100000382, 1110000383, 1120000384, 1130000386,
        1140000386, 1150000470, 1160000477, 1170000479, 1180000480, 1190000481,
        1200000483, 1210000483, 1220000485, 1230000486, 1240000487, 1250000488,
        1260000489, 1270000490, 1280000492, 1290000493, 1300000494, 1310000495,
        1320000496, 1330000498, 1340000498, 1350000501, 1360000501, 1370000503,
        1380000504, 1390000505, 1400000507, 1410000507, 1420000509, 1430000513,
        1440000597, 1450000602, 1460000602, 1470000604, 1480000604, 1490000606,
        1500000607, 1510000608, 1520000609, 1530000610, 1540000612, 1550000613,
        1560000614, 1570000615, 1580000616, 1590000617, 1600000619, 1610000619,
        1620000622, 1630000623, 1640000624, 1650000625, 1660000626, 1670000628,
        1680000628, 1690000630, 1700000630, 1710000632, 1720000715, 1730000723,
        1740000725, 1750000725, 1760000727, 1770000728, 1780000729, 1790000731,
        1800000731, 1810000733, 1820000734, 1830000735, 1840000736, 1850000737,
        1860000738, 1870000740, 1880000742, 1890000743, 1900000744, 1910000745,
        1920000746, 1930000747, 1940000749, 1950000749, 1960000751, 1970000752,
        1980000753, 1990000755, 2000000758,
    },
    {
        0,          10000000,   20000000,   30000000,   40000000,   50000000,
        60000000,   70000000,   80000000,   90000000,   100000000,  110000000,
        120000000,  130000000,  140000000,  150000000,  160000000,  170000000,
        180000000,  190000000,  200000000,  210000000,  220000000,  230000000,
        240000000,  250000000,  260000000,  270000000,  280000000,  290000001,
        300000001,  310000001,  320000001,  330000001,  340000001,  350000001,
        360000001,  370000001,  380000001,  390000001,  400000001,  410000001,
        420000001,  430000001,  440000001,  450000001,  460000001,  470000001,
        480000001,  490000001,  500000001,  510000001,  520000001,  530000001,
        540000001,  550000001,  560000001,  570000001,  580000002,  590000002,
        600000002,  610000002,  620000002,  630000002,  640000002,  650000002,
        660000002,  670000002,  680000002,  690000002,  700000002,  710000002,
        720000002,  730000002,  740000002,  750000002,  760000002,  770000002,
        780000002,  790000002,  800000002,  810000002,  820000002,  830000002,
        840000002,  850000002,  860000003,  870000003,  880000003,  890000003,
        900000003,  910000003,  920000003,  930000003,  940000003,  950000003,
        960000003,  970000003,  980000003,  990000003,  1000000003, 1010000003,
        1020000003, 1030000003, 1040000003, 1050000003, 1060000003, 1070000003,
        1080000003, 1090000003, 1100000003, 1110000003, 1120000003, 1130000003,
        1140000003, 1150000004, 1160000004, 1170000004, 1180000004, 1190000004,
        1200000004, 1210000004, 1220000004, 1230000004, 1240000004, 1250000004,
        1260000004, 1270000004, 1280000004, 1290000004, 1300000004, 1310000004,
        1320000004, 1330000004, 1340000004, 1350000004, 1360000004, 1370000004,
        1380000004, 1390000004, 1400000004, 1410000004, 1420000004, 1430000004,
        1440000005, 1450000005, 1460000005, 1470000005, 1480000005, 1490000005,
        1500000005, 1510000005, 1520000005, 1530000005, 1540000005, 1550000005,
        1560000005, 1570000005, 1580000005, 1590000005, 1600000005, 1610000005,
        1620000005, 1630000005, 1640000005, 1650000005, 1660000005, 1670000005,
        1680000005, 1690000005, 1700000005, 1710000005, 1720000006, 1730000006,
        1740000006, 1750000006, 1760000006, 1770000006, 1780000006, 1790000006,
        1800000006, 1810000006, 1820000006, 1830000006, 1840000006, 1850000006,
        1860000006, 1870000006, 1880000006, 1890000006, 1900000006, 1910000006,
        1920000006, 1930000006, 1940000006, 1950000006, 1960000006, 1970000006,
        1980000006, 1990000006, 2000000006,
    },
    {
        0,          10000000,   20000000,   30000000,   40000000,   50000000,
        60000000,   70000000,   80000000,   90000000,   100000000,  110000000,
        120000000,  130000000,  140000000,  150000000,  160000000,  170000000,
        180000000,  190000000,  200000000,  210000000,  220000000,  230000000,
        240000000,  250000000,  260000000,  270000000,  280000000,  290000000,
        300000000,  310000000,  320000000,  330000000,  340000000,  350000000,
        360000000,  370000000,  380000000,  390000000,  400000000,  410000000,
        420000000,  430000000,  440000000,  450000000,  460000000,  470000000,
        480000000,  490000000,  500000000,  510000000,  520000000,  530000000,
        540000000,  550000000,  560000000,  570000000,  580000000,  590000000,
        600000000,  610000000,  620000000,  630000000,  640000000,  650000000,
        660000000,  670000000,  680000000,  690000000,  700000000,  710000000,
        720000000,  730000000,  740000000,  750000000,  760000000,  770000000,
        780000000,  790000000,  800000000,  810000000,  820000000,  830000000,
        840000000,  850000000,  860000000,  870000000,  880000000,  890000000,
        900000000,  910000000,  920000000,  930000000,  940000000,  950000000,
        960000000,  970000000,  980000000,  990000000,  1000000000, 1010000000,
        1020000000, 1030000000, 1040000000, 1050000000, 1060000000, 1070000000,
        1080000000, 1090000000, 1100000000, 1110000000, 1120000000, 1130000000,
        1140000000, 1150000000, 1160000000, 1170000000, 1180000000, 1190000000,
        1200000000, 1210000000, 1220000000, 1230000000, 1240000000, 1250000000,
        1260000000, 1270000000, 1280000000, 1290000000, 1300000000, 1310000000,
        1320000000, 1330000000, 1340000000, 1350000000, 1360000000, 1370000000,
        1380000000, 1390000000, 1400000000, 1410000000, 1420000000, 1430000000,
        1440000000, 1450000000, 1460000000, 1470000000, 1480000000, 1490000000,
        1500000000, 1510000000, 1520000000, 1530000000, 1540000000, 1550000000,
        1560000000, 1570000000, 1580000000, 1590000000, 1600000000, 1610000000,
        1620000000, 1630000000, 1640000000, 1650000000, 1660000000, 1670000000,
        1680000000, 1690000000, 1700000000, 1710000000, 1720000000, 1730000000,
        1740000000, 1750000000, 1760000000, 1770000000, 1780000000, 1790000000,
        1800000000, 1810000000, 1820000000, 1830000000, 1840000000, 1850000000,
        1860000000, 1870000000, 1880000000, 1890000000, 1900000000, 1910000000,
        1920000000, 1930000000, 1940000000, 1950000000, 1960000000, 1970000000,
        1980000000, 1990000000, 2000000000,
    },
    {
        0,          10000000,   20000000,   30000000,   40000000,   50000000,
        60000000,   70000000,   80000000,   90000000,   100000000,  110000000,
        120000000,  130000000,  140000000,  150000000,  160000000,  170000000,
        180000000,  190000000,  200000000,  210000000,  220000000,  230000000,
        240000000,  250000000,  260000000,  270000000,  280000000,  290000000,
        300000000,  310000000,  320000000,  330000000,  340000000,  350000000,
        360000000,  370000000,  380000000,  390000000,  400000000,  410000000,
        420000000,  430000000,  440000000,  450000000,  460000000,  470000000,
        480000000,  490000000,  500000000,  510000000,  520000000,  530000000,
        540000000,  550000000,  560000000,  570000000,  580000000,  590000000,
        600000000,  610000000,  620000000,  630000000,  640000000,  650000000,
        660000000,  670000000,  680000000,  690000000,  700000000,  710000000,
        720000000,  730000000,  740000000,  750000000,  760000000,  770000000,
        780000000,  790000000,  800000000,  810000000,  820000000,  830000000,
        840000000,  850000000,  860000000,  870000000,  880000000,  890000000,
        900000000,  910000000,  920000000,  930000000,  940000000,  950000000,
        960000000,  970000000,  980000000,  990000000,  1000000000, 1010000000,
        1020000000, 1030000000, 1040000000, 1050000000, 1060000000, 1070000000,
        1080000000, 1090000000, 1100000000, 1110000000, 1120000000, 1130000000,
        1140000000, 1150000000, 1160000000, 1170000000, 1180000000, 1190000000,
        1200000000, 1210000000, 1220000000, 1230000000, 1240000000, 1250000000,
        1260000000, 1270000000, 1280000000, 1290000000, 1300000000, 1310000000,
        1320000000, 1330000000, 1340000000, 1350000000, 1360000000, 1370000000,
        1380000000, 1390000000, 1400000000, 1410000000, 1420000000, 1430000000,
        1440000000, 1450000000, 1460000000, 1470000000, 1480000000, 1490000000,
        1500000000, 1510000000, 1520000000, 1530000000, 1540000000, 1550000000,
        1560000000, 1570000000, 1580000000, 1590000000, 1600000000, 1610000000,
        1620000000, 1630000000, 1640000000, 1650000000, 1660000000, 1670000000,
        1680000000, 1690000000, 1700000000, 1710000000, 1720000000, 1730000000,
        1740000000, 1750000000, 1760000000, 1770000000, 1780000000, 1790000000,
        1800000000, 1810000000, 1820000000, 1830000000, 1840000000, 1850000000,
        1860000000, 1870000000, 1880000000, 1890000000, 1900000000, 1910000000,
        1920000000, 1930000000, 1940000000, 1950000000, 1960000000, 1970000000,
        1980000000, 1990000000, 2000000000,
    },
    {
        0,          10000000,   20000000,   30000000,   40000000,   50000000,
        60000000,   70000000,   80000000,   90000000,   100000000,  110000000,
        120000000,  130000000,  140000000,  150000000,  160000000,  170000000,
        180000000,  190000000,  200000000,  210000000,  220000000,  230000000,
        240000000,  250000000,  260000000,  270000000,  280000000,  290000000,
        300000000,  310000000,  320000000,  330000000,  340000000,  350000000,
        360000000,  370000000,  380000000,  390000000,  400000000,  410000000,
        420000000,  430000000,  440000000,  450000000,  460000000,  470000000,
        480000000,  490000000,  500000000,  510000000,  520000000,  530000000,
        540000000,  550000000,  560000000,  570000000,  580000000,  590000000,
        600000000,  610000000,  620000000,  630000000,  640000000,  650000000,
        660000000,  670000000,  680000000,  690000000,  700000000,  710000000,
        720000000,  730000000,  740000000,  750000000,  760000000,  770000000,
        780000000,  790000000,  800000000,  810000000,  820000000,  830000000,
        840000000,  850000000,  860000000,  870000000,  880000000,  890000000,
        900000000,  910000000,  920000000,  930000000,  940000000,  950000000,
        960000000,  970000000,  980000000,  990000000,  1000000000, 1010000000,
        1020000000, 1030000000, 1040000000, 1050000000, 1060000000, 1070000000,
        1080000000, 1090000000, 1100000000, 1110000000, 1120000000, 1130000000,
        1140000000, 1150000000, 1160000000, 1170000000, 1180000000, 1190000000,
        1200000000, 1210000000, 1220000000, 1230000000, 1240000000, 1250000000,
        1260000000, 1270000000, 1280000000, 1290000000, 1300000000, 1310000000,
        1320000000, 1330000000, 1340000000, 1350000000, 1360000000, 1370000000,
        1380000000, 1390000000, 1400000000, 1410000000, 1420000000, 1430000000,
        1440000000, 1450000000, 1460000000, 1470000000, 1480000000, 1490000000,
        1500000000, 1510000000, 1520000000, 1530000000, 1540000000, 1550000000,
        1560000000, 1570000000, 1580000000, 1590000000, 1600000000, 1610000000,
        1620000000, 1630000000, 1640000000, 1650000000, 1660000000, 1670000000,
        1680000000, 1690000000, 1700000000, 1710000000, 1720000000, 1730000000,
        1740000000, 1750000000, 1760000000, 1770000000, 1780000000, 1790000000,
        1800000000, 1810000000, 1820000000, 1830000000, 1840000000, 1850000000,
        1860000000, 1870000000, 1880000000, 1890000000, 1900000000, 1910000000,
        1920000000, 1930000000, 1940000000, 1950000000, 1960000000, 1970000000,
        1980000000, 1990000000, 2000000000,
    },
};
long long cnt[16];
bool check(long long x, long long t) {
  memset(cnt, 0, sizeof(cnt));
  while (x) {
    long long c = x & 15;
    x >>= 4;
    cnt[c]++;
    if (cnt[c] > t) return false;
  }
  return true;
}
char getChar(long long x) {
  if (x < 10) return x + '0';
  return x - 10 + 'a';
}
string getHex(long long x) {
  string res;
  while (x) {
    long long c = x % 16;
    x /= 16;
    res += getChar(c);
  }
  reverse(res.begin(), res.end());
  return res;
}
int main(void) {
  long long k, t;
  cin >> k >> t;
  long long ans = a[t][k / st[t]];
  k %= st[t];
  k++;
  while (k) {
    if (check(ans, t)) {
      k--;
      if (k == 0) break;
    }
    ans++;
  }
  cout << getHex(ans) << '\n';
  return 0;
}

```