{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "_cell_guid": "510d378e-60fa-9504-ea9c-364c05fcb4bf"
      },
      "outputs": [],
      "source": [
        "import numpy as np\n",
        "import pandas as pd\n",
        "import csv"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "_cell_guid": "c0f1651f-e840-d1ee-5f06-9f6a25a81c12"
      },
      "outputs": [],
      "source": [
        "\n",
        "L = [37,141,377,593,611,794,886,927,1169,1172,1239,1271,1368,1432,1571,1825,1907,1924,1995,2207,2321,2528,2588,2692,2791,2811,3094,3296,3326,3350,3524,3664,4237,4322,4345,4636,4799,4867,4911,5140,5259,5430,5512,5558,5584,5640,5705,5911,5912,5971,6681,6814,6958,7007,7166,7419,7813,7847,7982,7984,8102,8122,8253,8254,8274,8335,8339,8410,8458,8481,8534,8733,8770,8923,8955,8961,9012,9076,9275,9291,9516,9608,9702,9718,9793,9874,10021,10139,10222,10224,10265,10327,10434,10473,10537,10566,10684,10702,10818,11016,11229,11231,11305,11345,11460,11551,11669,11767,11877,11881,11917,12146,12290,12349,12571,12707,12739,12761,12987,12988,13020,13386,13533,13703,13770,13956,13977,14341,14382,14518,14587,14695,14855,15044,15101,15265,15281,15364,15368,15370,15562,15581,15678,15736,16071,16180,16183,16225,16309,16430,16431,16559,16700,16856,16899,17261,17295,17328,17525,17992,18025,18157,18223,18230,18411,18421,18434,18472,18675,18734,18737,18936,19190,19235,19268,19324,19359,19437,19597,19757,19848,19927,20153,20315,20449,20635,20644,20788,20824,20860,20906,21131,21316,21798,21890,21946,22131,22251,22418,22768,22811,22883,22996,23247,23344,23380,23576,23608,23654,23743,23882,23900,23994,24282,24334,24347,24478,24547,24709,24846,24879,24922,24998,25081,25250,25416,25809,25855,26008,26088,26115,26149,26253,26268,26356,26389,26400,26432,26517,26632,26633,26691,26759,26848,26905,27093,27171,27204,27419,27488,27622,27950,28138,28161,28319,28322,28758,28831,28920,29041,29053,29126,29225,29241,29402,29446,29599,29663,29666,29819,29951,30000,30224,30559,30645,30663,30782,30847,30953,31026,31157,31158,31201,31250,31267,31301,31635,31636,31649,31651,31764,31896,32012,32170,32206,32224,32475,32515,32856,33058,33187,33242,33243,33256,33420,33453,33611,33690,33721,33780,33837,33951,34005,34154,34378,34473,34585,34609,34744,34778,34791,34800,34973,35024,35103,35170,35208,35421,35469,35519,35642,35643,35666,35734,35780,35853,35858,35956,36030,36093,36181,36261,36620,36820,36939,37393,37477,37511,37610,37660,37747,37868,37995,38029,38034,38112,38201,38369,38372,38386,38482,38489,38535,38627,38670,38688,38732,38833,38889,38901,38912,39243,39264,39296,39353,39462,39589,39635,39719,39728,39871,40020,40044,40177,40246,40328,40564,40595,40720,40851,40869,40935,40983,41193,41342,41458,41504,41516,41553,41605,41613,41614,41729,41858,42090,42182,42281,42282,42399,42606,42609,42674,42774,43087,43141,43274,43385,43435,43586,43715,43802,43804,43825,43919,44543,44766,44827,44865,44928,44953,44966,44982,45017,45080,45082,45137,45532,45598,45707,45724,45780,45803,45861,45862,46030,46304,46350,46394,46750,46751,46836,47012,47013,47150,47202,47217,47239,47407,47426,47473,47641,47679,47705,48017,48019,48199,48209,48221,48259,48260,48265,48457,48492,48518,48744,48914,49025,49168,49175,49486,49565,49761,49804,49805,49816,49957,50347,50415,50559,50760,50765,50782,50880,51078,51097,51341,51378,51396,51499,51631,51706,51796,52386,52500,52568,52585,52628,52708,52786,52788,52951,53219,53399,53517,53724,53879,53924,53984,54044,54132,54239,54247,54274,54349,54409,54485,54666,54821,54859,54879,55273,55382,55417,55518,55610,55912,55916,56015,56016,56046,56055,56362,56379,56510,56691,56836,56954,57031,57064,57101,57310,57543,57597,57598,57706,57848,57937,58127,58130,58421,58545,58577,58700,58707,58767,58803,58869,58914,58948,58970,59029,59300,59535,59542,59596,59638,59705,59714,59961,60048,60098,60184,60206,60239,61193,61282,61585,61680,61798,61808,61815,61959,62300,62395,62455,62638,62778,62914,62928,62970,62994,63012,63085,63095,63106,63275,63368,63501,63535,63570,63599,63815,63842,63938,63951,64153,64229,64387,64598,64625,64892,64900,64964,65300,65398,65399,65409,65732,65826,65862,65863,65923,66234,66301,66548,66792,66861,67039,67077,67102,67310,67381,67549,68085,68411,68510,68521,68572,68597,68755,68761,68903,69145,69214,69300,69338,69401,69439,69476,69577,69814,69932,70065,70176,70231,70373,70374,70375,70397,70613,70754,70777,70949,70972,71030,71145,71179,71251,71514,71526,71550,71551,71595,71777,71913,72457,72606,72619,72656,72684,73440,73549,73657,73667,73794,74117,74206,74552,74657,74801,74854,74938,74972,75177,75204,75258,75292,75420,75596,75662,75770,75873,75977,76254,76432,76449,76730,76775,76894,76959,77071,77144,77180,77220,77401,77524,77552,77591,77649,77677,77708,77774,77787,77804,77806,77812,77899,77906,77949,78065,78112,78238,78350,78392,78404,78485,78556,78868,78885,79036,79150,79232,79337,79341,79417,79418,79589,79610,79689,79741,79760,79865,79881,79957,80090,80150,80151,80823,80860,80861,81087,81327,81537,81613,81714,81899,81920,81978,82141,82165,82222,82667,82669,82675,82742,82834,83242,83479,83703,83792,83908,83909,84031,84065,84066,84215,84328,84434,84461,85116,85283,85336,85482,85617,85757,86010,86073,86183,86335,86336,86591,86631,86768,86805,86809,86837,86901,86902,87017,87127,87132,87210,87305,87349,87400,87401,87447,87451,87465,87695,87844,88121,88202,88508,88877,89135,89272,89293,89313,89314,89534,89586,89875,89947,90009,90079,90145,90165,90269,90472,90474,90515,90559,90609,90647,90648,90663,90803,90981,91234,91270,91271,91589,91693,91722,92117,92305,92426,92545,92599,92771,92892,92909,93055,93210,93224,93258,93291,93342,93388,93499,93628,93629,93643,94050,94063,94086,94087,94187,94374,94461,94523,94543,95101,95244,95250,95343,95393,95405,95588,95704,96150,96177,96244,96631,96710,96758,96900,96942,96955,97094,97191,97255,97424,97478,97719,97787,97868,97935,98078,98144,98172,98202,98214,98289,98393,98626,98658,98662,98671,98816,98888,98920,99063,99072,99075,99156,99191,99536,99549,99558,99630,99701,99728,99849,100216,100217,100248,100305,100470,100590,100748,100918,101066,101146,101188,101203,101292,101355,101480,101558,101601,101602,101604,101722,101797,101813,101886,101957,102003,102075,102153,102159,102191,102473,102515,102516,102569,102579,102677,102678,102854,102904,103164,103165,103264,103265,103365,103381,103403,103701,103719,103763,103816,104138,104155,104161,104200,104498,104510,104625,104665,104700,104703,104761,104765,104846,104877,104886,104945,104952,104994,105369,105424,105559,105569,105571,105629,105664,105989,106352,106419,106423,106442,106485,106622,106674,106721,107081,107103,107204,107333,107377,107475,107476,107487,107632,107664,107723,107741,107749,107793,107853,108008,108074,108101,108118,108214,108215,108267,108431,108441,108580,108760,108875,108983,109642,109757,109783,109786,109967,109977,110131,110256,110278,110329,110433,110530,110579,110683,110687,110732,110802,110966,111017,111024,111271,111301,111385,111503,111504,111632,111633,111634,111696,111827,111945,112315,112326,112441,112506,112507,112519,112565,112683,112800,113054,113059,113244,113435,113453,113583,113661,113662,113699,113913,113917,113974,114045,114227,114271,114282,114380,114597,114787,114862,114868,115068,115084,115085,115119,115248,115249,115250,115386,115523,115560,115580,115678,115789,115798,115954,116046,116226,116304,116321,116335,116440,116514,116532,116567,116607,116625,116633,116682,116707,116787,116862,117546,117667,117927,118199,118229,118296,118334,118387,118499,118563,118636,118804,118806,118855,118921,119196,119299,119463,119499,119675,119902,119927,119996,120051,120072,120154,120227,120300,120953,121001,121058,121071,121115,121485,121499,121624,121752,121886,121947,121961,122028,122053,122132,122154,122577,122592,122771,122923,122980,123035,123057,123522,123611,123823,123855,124028,124071,124124,124505,124539,124546,124606,124687,124701,124707,124716,124853,125018,125167,125258,125382,125396,125403,125527,125661,125665,125695,125757,125895,126102,126359,126371,126462,126592,126645,126742,126985,127036,127113,127208,127368,127369,127446,127462,127909,128069,128313,128488,128639,128705,128715,128789,128981,129090,129172,129194,129207,129280,129308,129346,129661,129710,129847,129881,129960,130321,130521,130767,130770,131268,131336,131565,131668,131719,131723,131844,132041,132267,132342,132381,132436,132583,132666,132839,132907,133153,133252,133363,133520,133536,133653,133834,133877,133945,134074,134254,134266,134313,134489,134527,134670,134871,134932,134956,135396,135441,135453,135479,135692,135727,135844,136021,136165,136202,136228,136230,136326,136376,136383,136503,136666,136787,136890,136977,137157,137169,137353,137438,137470,137488,137595,137602,137705,138065,138122,138143,138206,138451,138762,138792,138825,138843,138844,138853,138957,139199,139454,139481,139598,139774,139989,140376,140392,140423,140636,140643,140700,140764,140836,140885,140977,141165,141303,141317,141357,141381,141432,141557,141613,141618,141656,141787,141909,141955,142225,142310,142423,142513,142558,142647,142764,142806,142936,143015,143225,143235,143260,143283,143315,143371,143401,143495,143925,143972,144045,144215,144273,144365,144492,144820,144889,145027,145042,145069,145092,145159,145264,145299,145329,145399,145538,145591,145689,145765,145887,146066,146205,146239,146274,146494,146548,146603,146622,146667,146752,146825,146829,146986,147055,147061,147143,147255,147345,147389,147482,147577,147872,147897,147968,148027,148087,148238,148443,148577,148608,148808,149242,149249,149254,149425,149559,149600,149948,149971,150031,150044,150208,150269,150393,150700,150731,150935,151057,151308,151332,151345,151464,151465,151556,151782,151799,151899,151914,152011,152017,152093,152125,152355,152490,152742,152956,153304,153338,153424,153459,153507,153612,153802,153819,153932,153973,154225,154272,154407,154452,155053,155093,155172,155210,155351,155654,155715,155904,155949,156069,156245,156305,156660,156760,156837,157149,157178,157331,157422,157423,157696,157706,157874,157893,157956,158004,158114,158167,158226,158413,158482,158652,158715,158725,158737,158947,158989,159021,159046,159188,159338,159457,159925,159927,160167,160192,160223,160266,160326,160327,160346,160374,160381,160443,160732,160744,161179,161192,161232,161252,161302,161383,161395,161490,161512,161677,161763,162055,162132,162186,162339,162818,163150,163241,163553,163582,163881,163970,164297,164411,164421,164571,164724,164855,164930,164996,165085,165202,165312,165404,165553,165555,165564,165742,165907,166153,166156,166221,166306,166397,166542,166581,166663,166844,166990,167478,167670,167692,167865,167883,168018,168290,168295,168639,168697,168742,168819,168924,168931,168962,169066,169141,169183,169280,169291,169412,169452,169574,169582,169583,169609,169739,169745,169770,169776,169791,169829,169841,169874,169944,169956,170130,170172,170310,170455,170493,170498,170542,170767,170769,170803,171028,171304,171430,171530,171628,171657,171709,171727,171933,171982,171996,172045,172108,172139,172252,172256,172403,172479,172717,172759,173076,173119,173227,173399,173566,173672,173868,174045,174207,174315,174332,174565,174881,175048,175084,175088,175130,175216,175239,175252,175640,175719,175805,175822,175856,175916,175973,176032,176077,176095,176142,176476,176477,176635,176798,176799,176890,176898,177199,177368,177428,177594,177707,177853,177932,178018,178236,178342,178463,178518,178526,178563,178693,178875,178877,178955,179042,179053,179108,179109,179347,179432,179628,179658,179745,179758,179833,179896,180069,180156,180211,180261,180299,180329,180370,180590,180679,180705,180715,180805,180872,181118,181171,181210,181339,181448,181450,181994,182029,182135,182137,182140,182210,182228,182280,182310,182473,182494,182693,182792,182960,182982,182988,183179,183325,183329,183774,183778,183869,183958,184042,184053,184102,184211,184250,184470,184556,184653,184797,184823,184831,185243,185655,185694,185824,185830,185831,185862,185946,186196,186543,186661,186792,186993,187077,187111,187217,187314,187318,187357,187631,187746,187755,187790,187936,188019,188101,188152,188283,188317,188613,188813,188999,189016,189052,189153,189242,189367,189379,189475,189888,189935,190133,190263,190360,190622,190811,190835,190888,190942,191030,191074,191105,191259,191289,191351,191352,191485,191501,191507,191509,191553,191836,191966,191982,192008,192251,192262,192269,192321,192674,192794,192806,192906,192947,193237,193262,193298,193490,193546,193583,193741,194283,194303,194594,194612,194864,194935,194976,195060,195174,195175,195179,195272,195362,195536,195868,196319,196418,196631,196681,196859,197002,197023,197127,197274,197310,197363,197408,197426,197719,198033,198053,198222,198262,198292,198293,198309,198345,198355,198524,198592,198707,198751,198759,198906,198912,199009,199185,199274,199389,199609,199629,199695,199717,199998,200219,200406,200691,200808,201226,201303,201405,201468,201664,201755,201796,202022,202083,202091,202224,202398,202461,202488,202714,202724,202790,202927,202995,203124,203129,203134,203151,203239,203272,203394,203431,203483,203539,203598,203778,204168,204308,204309,204540,204592,204840,204969,205096,205160,205201,205220,205244,205575,205576,205734,205740,205927,205933,205987,206123,206129,206338,206687,206779,206876,206877,206980,207218,207622,207752,207816,207852,207933,207934,207997,208032,208035,208097,208098,208108,208183,208287,208329,208355,208424,208558,208672,208824,209076,209244,209276,209288,209303,209333,209474,209482,209483,209507,209523,209572,209630,209660,209755,209773,209805,210158,210218,210399,210488,210489,210492,210591,210795,210811,210879,211017,211028,211258,211315,211320,211442,211693,211795,211855,211907,212007,212180,212378,212457,212720,212941,212969,212987,213027,213041,213087,213173,213262,213387,213466,213724,213848,213917,214006,214234,214524,214547,214671,214686,214856,215109,215120,215306,215413,215503,215638,215665,215688,215735,215741,216062,216079,216117,216133,216135,216179,216210,216238,216334,216383,216556,216567,216571,216592,216892,217012,217091,217254,217384,217462,217471,217595,217600,217665,217674,217682,217758,217927,218113,218201,218313,218393,218485,218559,218564,218809,218812,218825,218827,219102,219132,219400,219541,219563,220084,220107,220144,220345,220379,220403,220913,220914,221013,221138,221493,221698,221806,221815,221909,221935,222440,222450,222454,222604,222626,222847,223016,223172,223264,223265,223473,223699,224358,224489,224596,224701,224735,224736,224792,224884,224989,225048,225072,225296,225340,225524,225600,225655,225700,225793,225957,225987,225996,226109,226376,226381,226428,226636,226648,226680,226832,226945,227245,227246,227363,227525,227537,227925,227936,227944,228263,228264,228265,228266,228311,228315,228519,228545,228624,228715,228800,228844,228951,229007,229055,229077,229225,229296,229362,229499,229549,229810,229916,229951,229968,230039,230164,230232,230344,230351,230571,230743,230823,230876,231054,231314,231329,231550,231610,231726,231954,231958,232017,232018,232132,232527,232528,232569,232747,232757,232762,233081,233082,233186,233531,233577,233618,233621,233678,233740,233793,233972,233994,234051,234072,234101,234173,234187,234273,234418,234440,234684,234696,234707,234763,234857,234995,235004,235082,235106,235288,235454,235506,235625,235710,235958,236169,236400,236570,236652,236653,236716,236909,237023,237024,237088,237150,237209,237245,237284,237317,237322,237437,237734,237900,238107,238140,238283,238452,238603,238668,238726,238779,238862,238865,239075,239076,239143,239259,239457,239459,239481,239530,239583,239630,239723,239880,239935,240083,240210,240355,240380,240381,240463,240603,240683,240696,240850,240985,241002,241015,241103,241244,241299,241354,241621,241775,241901,242005,242030,242094,242172,242205,242253,242259,242387,242452,242510,242526,242534,242796,242809,242883,243224,243354,243572,243651,243790,243815,243870,243949,244047,244251,244291,244317,244318,244405,245110,245219,245386,245468,245595,245634,245668,245670,245715,246084,246102,246126,246164,246317,246433,246444,246533,246552,246887,246906,247050,247086,247087,247144,247211,247213,247260,247261,247420,247855,247908,248077,248085,248108,248216,248280,248390,248414,248445,248477,248491,248521,248623,248736,248873,248883,248968,249000,249045,249123,249200,249229,249327,249342,249436,249634,249827,249974,250173,250204,250400,250780,250887,250905,250914,250994,251075,251080,251187,251350,251662,251835,251892,251953,252022,252061,252064,252089,252403,252594,252882,253011,253051,253121,253168,253171,253192,253229,253230,253310,253329,253337,253476,253545,253771,253799,253970,254150,254273,254288,254443,254505,254634,255114,255242,255540,255560,255649,255823,256199,256303,256379,256383,256384,256501,256798,256910,256911,257000,257011,257073,257078,257088,257124,257150,257265,257359,257390,257488,257569,257595,258005,258142,258143,258208,258599,258665,258838,258886,258918,258936,258954,259195,259627,259656,259735,259748,259773,259814,260013,260028,260084,260085,260225,260257,260283,260294,260561,260780,260959,261233,261324,261649,262197,262491,262658,262769,262776,262786,263043,263095,263204,263265,263423,263425,263506,263548,263549,263550,263557,263573,263574,263704,264012,264125,264126,264237,264362,264575,264618,264709,264796,264803,264809,265499,265586,265740,265760,265800,265862,265945,265947,266217,266308,266444,266505,266730,266855,267149,267477,267599,267757,267923,268068,268069,268418,268466,268626,268640,268688,268729,268794,268876,269029,269442,269778,269787,269882,269985,270168,270347,270379,270476,270633,270676,270677,270782,271096,271166,271197,271262,271331,271359,271360,271526,271604,271756,271869,271943,271977,272427,272671,272682,272757,272806,272829,272858,272928,272951,273143,273171,273173,273275,273346,273488,273556,273848,273950,273991,274028,274089,274180,274429,274530,274786,274798,274819,274941,275072,275182,275279,275349,275450,275609,275644,275747,275950,275951,276035,276392,276467,276581,276588,276595,276676,276788,276801,276854,276872,276984,277489,277568,277730,277770,277843,277877,278071,278087,278130,278348,278379,278435,278523,278681,278756,278830,278981,279182,279535,279586,280134,280240,280265,280346,280398,280693,280695,280703,280954,280976,281069,281070,281071,281212,281280,281328,281441,281447,281469,281573,281692,281734,281999,282000,282068,282069,282070,282075,282126,282175,282180,282228,282418,282433,282495,282537,282718,282722,282750,282956,282999,283034,283107,283140,283329,283547,283617,283651,283867,283907,283984,284025,284059,284155,284196,284445,284684,284710,284758,284847,284986,285069,285105,285109,285149,285417,285445,285606,285615,285775,285822,285988,286100,286105,286154,286418,286453,286594,286722,286740,286814,286896,286924,287033,287059,287136,287186,287237,287246,287372,287377,287438,287786,287840,287865,287931,287953,287982,288028,288271,288287,288354,288570,288705,288706,288785,288957,289009,289118,289167,289327,289620,289689,289764,290265,290533,290583,290610,290623,290669,290696,290729,290732,290745,290778,290902,291025,291072,291601,291611,291880,292236,292242,292321,292506,292582,292583,292679,292699,292729,292767,292901,292939,293047,293244,293410,293638,293720,294091,294213,294252,294314,294531,294584,294610,294779,294811,294821,294853,295016,295056,295086,295201,295364,295552,295704,295809,295835,295913,295951,295952,295967,296066,296094,296116,296143,296224,296243,296395,296405,296516,296592,296633,296645,296742,296749,296853,296947,297326,297447,297483,297548,297591,297698,297706,297712,297723,298053,298246,298382,298655,298733,298737,298763,298843,298998,299110,299115,299211,299318,299328,299526,299541,299968,299998,299999,300108,300114,300274,300386,300442,300529,300612,300635,300738,300919,301212,301264,301285,301675,301827,301869,302104,302126,302564,302744,302759,302824,302922,302997,303276,303443,303551,303707,303727,303738,303910,304017,304206,304299,304309,304409,304618,304877,304946,305034,305046,305068,305107,305408,305420,305441,305471,305569,305789,305860,305871,306030,306031,306065,306098,306182,306207,306247,306254,306291,306458,306520,306645,306789,306855,306971,306988,307045,307385,307532,307559,307588,308008,308070,308077,308267,308430,308451,308494,308532,308769,308886,308887,308948,308999,309152,309309,309403,309495,309654,309713,309898,310036,310196,310220,310286,310294,310587,311453,311596,311836,312163,312292,312603,312719,312735,312946,313030,313171,313316,313380,313420,313699,313913,313998,314028,314041,314083,314185,314326,314376,314377,314467,314475,314609,314766,314824,315012,315115,315118,315120,315239,315357,315457,315577,315578,315642,315775,315926,315985,316167,316366,316427,316493,316625,316688,316698,317108,317252,317256,317261,317387,317423,317498,317665,317729,317731,317769,317786,317868,318029,318117,318386,318387,318388,318389,318609,318662,318668,318690,318751,318781,318919,319140,319189,319293,319435,319479,319535,319637,319641,319668,319765,320041,320118,320347,320387,320532,320603,320702,320869,320977,321051,321100,321200,321255,321256,321323,321339,321569,321891,322049,322100,322204,322354,322476,322561,322626,322674,322747,322848,323024,323085,323166,323479,323622,323670,323764,323824,323864,323948,324169,324232,324265,324372,324383,324412,324462,324611,324674,324685,324740,324773,324779,324867,324937,325018,325243,325313,325327,325594,325674,325739,325948,326032,326058,326080,326375,326416,326566,326593,326713,326757,326866,326962,326998,327036,327486,327562,327633,327682,327695,327710,327884,328046,328121,328127,328249,328262,328349,328519,328694,328715,328927,328952,329024,329173,329359,329405,329462,329653,329749,329977,330021,330036,330059,330172,330187,330247,330286,330639,330767,330805,330848,330905,330906,330941,330968,331015,331130,331136,331358,331449,331462,331630,331742,331749,332001,332126,332154,332214,332310,332311,332371,332440,332567,332676,332827,332850,333074,333075,333178,333198,333201,333409,333617,333621,333682,333775,333961,334115,334710,334956,335014,335191,335252,335326,335534,335724,335803,335833,335977,336111,336356,336455,336467,336509,336516,336642,336710,336711,336850,336868,336934,336952,337337,337399,337460,337573,337586,337677,337938,338034,338049,338052,338104,338155,338198,338230,338235,338247,338299,338300,338477,338579,338830,338931,339056,339262,339295,339446,339685,340143,340182,340242,340310,340390,340418,340474,340475,340483,340630,340657,340694,340845,341000,341302,341502,341545,341597,341716,341836,342002,342044,342073,342566,342673,342700,343207,343332,343489,343539,343602,343616,343675,343682,343813,343962,344078,344140,344273,344337,344395,344530,344837,344929,345000,345417,345431,345591,345686,345973,346024,346161,346277,346300,346375,346675,346714,346737,347035,347115,347255,347341,347404,347626,347720,347831,347932,347940,348134,348232,348270,348319,348591,348592,348596,348647,348714,348748,348782,348789,348841,348954,349173,349551,349569,350120,350257,350264,350271,350300,350536,350703,350733,350764,350897,350999,351115,351116,351251,351395,351504,351508,351612,351619,351683,351732,351772,351977,352184,352191,352313,352323,352465,352517,352527,352542,352861,353165,353208,353214,353457,353508,353525,353671,353710,353948,354189,354271,354290,354362,354404,354604,354741,354774,354777,354824,354924,354976,355017,355182,355668,355690,355775,355868,355988,355993,356130,356217,356233,356612,356704,356756,356948,357158,357187,357255,357372,357410,357417,357590,357660,357774,358118,358206,358234,358330,358372,358590,358617,358685,358698,358720,358760,358782,358832,359068,359162,359180,359204,359286,359336,359361,359710,359719,359803,359888,360005,360078,360083,360457,360662,360848,360932,361032,361307,361341,361538,361725,362107,362519,362627,362730,362903,362952,362958,362987,362988,363107,363218,363219,363285,363294,363351,363365,363399,363506,363519,363520,363532,363541,363632,363646,363660,363765,363822,363840,363926,363992,364090,364104,364172,364338,364522,364614,364694,365048,365213,365259,365374,365480,365487,365512,365677,365776,365881,365934,366021,366095,366174,366344,366350,366374,366375,366385,366460,366578,366607,366821,366898,367247,367252,367614,367786,367823,367832,367836,368083,368400,368464,368516,368596,368833,369095,369103,369129,369152,369229,369252,369333,369407,369444,369453,369498,369548,369763,369911,370000,370019,370225,370227,370233,370541,370604,370635,370894,370929,370987,371290,371373,371541,371552,371560,371612,371660,371928,371968,371969,371972,372218,372264,372577,372643,372687,372782,373114,373141,373214,373230,373231,373285,373360,373390,373482,373555,373598,373674,373743,373754,373780,373828,373829,373984,374028,374088,374106,374185,374262,374370,374421,374522,374659,374701,374710,375005,375012,375068,375204,375277,375412,375417,375476,375540,375542,375603,375679,375868,376104,376489,376569,376649,376693,376943,377225,377356,377542,378027,378231,378316,378409,378420,378703,378883,379116,379144,379232,379536,379551,379624,379636,379720,379895,379926,380067,380078,380177,380344,380506,380810,380868,380918,380923,380925,380926,380974,381046,381152,381211,381272,381310,381436,381484,381726,381889,382044,382060,382079,382150,382162,382222,382435,382503,382509,382569,382878,382905,382911,382969,382982,383281,383422,383982,384034,384183,384186,384215,384327,384410,384420,384705,384839,384879,385050,385160,385172,385232,385237,385545,385649,385656,385849,385855,385873,385909,386045,386075,386274,386383,386387,386425,386479,386811,386944,387000,387072,387145,387179,387305,387362,387363,387389,387398,387453,387484,387498,387499,387726,387876,387890,387936,388048,388073,388301,388336,388384,388494,388498,388741,388753,388843,389087,389162,389197,389383,389388,389409,389491,389616,389663,389732,389738,389794,389829,389958,390080,390116,390346,390386,390533,390586,390705,390706,390737,390782,391085,391097,391290,391462,391549,391550,391559,391787,391951,391975,392113,392222,392224,392296,392306,392379,392435,392542,392808,392815,392840,393126,393178,393300,393407,393561,393616,393619,393901,394247,394341,394426,394453,394602,394766,394779,394807,394873,395069,395163,395299,395434,395591,395625,395781,395851,396134,396138,396264,396634,396635,396771,396970,396988,397015,397146,397218,397296,397457,397855,397941,398107,398334,398374,398536,398793,398840,398953,398986,399234,399276,399296,399446,399812,399849,399998,400399,400543,400676,400758,400809,400829,400948,400977,401138,401206,401227,401244,401393,401394,401455,401603,401710,401807,401874,401888,401966,402235,402256,402445,402565,402686,402732,402755,402770,402838,403134,403257,403266,403341,403500,403814,403847,403882,404022,404029,404243,404302,404313,404324,404351,404352,404402,404500,404721,404727,404778,404788,404792,405045,405256,405263,405406,405466,405480,405503,405587,406009,406117,406155,406192,406204,406211,406237,406332,406457,406508,406697,406731,406814,406944,407039,407191,407385,407478,407547,407735,407752,407986,408054,408074,408168,408675,408697,408737,408738,408772,408776,408806,408877,408976,409007,409174,409217,409227,409416,409772,409955,410297,410380,410423,410518,410568,410685,410686,410693,410770,411102,411271,411366,411412,411479,411549,411682,411763,411914,411926,411998,412003,412019,412068,412151,412334,412339,412387,412607,412726,412768,412815,413023,413373,413548,413582,413632,413859,413860,414084,414127,414412,414413,414691,414692,414733,414779,414821,414893,415134,415151,415185,415213,415538,415608,415819,415833,416015,416036,416044,416090,416325,416443,416532,416582,416608,416736,416839,417055,417119,417462,417475,417479,417573,417590,417769,417856,417883,417938,418132,418191,418305,418436,418513,418628,418682,418770,418794,418816,419026,419028,419037,419281,419360,419374,419447,419692,419726,419736,419814,419833,419835,419879,420340,420580,420640,420765,421006,421118,421233,421266,421324,421387,421731,421734,421912,421967,422087,422163,422175,422255,422420,422434,422554,422627,422779,422956,423016,423017,423020,423024,423025,423073,423266,423272,423366,423383,423943,423944,424101,424282,424340,424417,424540,424633,424648,424677,424713,424845,424890,425080,425209,425238,425248,425297,425311,425471,425670,425798,425861,425907,426061,426071,426084,426263,426393,426403,426406,426425,426540,426606,426670,426754,426969,427073,427087,427575,427641,427743,427754,427844,428008,428028,428143,428310,428311,428460,428675,428740,428928,429006,429010,429111,429269,429330,429519,429645,429722,429802,429907,430173,430238,430272,430325,430335,430370,430418,431236,431290,431344,431411,431461,431465,431571,431600,431733,431803,432168,432218,432221,432361,432686,432692,432717,432778,432887,433077,433117,433386,433487,433490,433594,433648,433924,434003,434081,434316,434544,434686,434864,434911,435056,435103,435248,435255,435256,435268,435482,435579,435621,435636,435871,435874,435939,436087,436098,436165,436506,436882,436919,436951,437160,437254,437291,437424,437437,437806,437862,437973,438107,438312,438350,438357,438366,438490,438652,438718,438761,438837,438952,439013,439100,439209,439310,439458,439651,439671,440103,440155,440210,440212,440331,440349,440716,440870,440910,441021,441084,441108,441298,441475,441506,441964,442026,442042,442200,442400,442525,442707,442718,442840,442846,442862,443310,443366,443452,443603,443625,443716,443777,444005,444118,444135,444137,444191,444823,444874,444889,445012,445037,445173,445287,445308,445409,445704,445779,445835,445868,445934,446243,446443,446452,446502,446688,446730,446895,446915,447008,447044,447172,447186,447330,447511,447567,447667,447876,448036,448262,448336,448487,448740,449027,449096,449135,449211,449219,449398,449580,449628,449656,449659,449683,449978,450240,450256,450538,450576,450594,450989,450991,451041,451105,451123,451218,451230,451283,451284,451305,452021,452141,452194,452286,452425,452762,452859,453020,453227,453384,453480,453597,453614,453617,453708,453794,453890,454099,454140,454470,454701,454779,454843,454980,455078,455079,455217,455428,455603,455767,455814,455872,456180,456287,456365,456389,456442,456520,456576,456642,456705,456880,457016,457029,457090,457547,457592,457766,457805,457815,457848,458006,458090,458286,458377,458473,458930,458955,459148,459201,459413,459480,459524,459585,459624,459676,459815,460067,460180,460270,460334,460430,460498,460539,460609,460663,460773,460961,460972,461041,461078,461089,461190,461261,461336,461413,461517,461612,461676,461802,461844,462019,462040,462089,462116,462660,462662,462691,462698,462731,462772,462806,462978,463047,463214,463226,463310,463312,463560,463596,463631,463688,463760,464197,464229,464372,464392,464567,464568,464623,464700,464830,464867,464935,464957,465138,465141,465203,465246,465766,465951,466065,466126,466219,466232,466326,466638,466681,466841,466988,467281,467425,467493,467550,467556,467614,467687,467717,467757,467766,467789,467971,468019,468032,468185,468204,468367,468547,468604,468628,468641,468878,468884,469027,469046,469176,469217,469251,469481,469497,469552,469720,470116,470148,470365,470396,470646,470683,470805,470846,470915,471061,471237,471441,471447,471485,471660,471667,471696,471733,471841,471872,471950,472073,472273,472289,472469,472506,472557,472660,472869,472945,472947,472951,473010,473120,473381,473499,473611,473779,473887,474054,474065,474089,474701,474768,474814,474884,475003,475219,475362,475403,475471,475501,475565,475608,475706,475708,475784,475896,475969,476038,476074,476196,476307,476360,476506,476512,476621,476630,476669,476713,476855,476858,476871,476930,477115,477165,477241,477247,477286,477454,477717,477840,477947,477970,478059,478232,478259,478307,478475,478647,478667,478811,478824,479238,479239,479338,479428,479617,479618,479647,479894,479911,480074,480100,480247,480348,480357,480417,480502,480604,480617,480939,481061,481133,481143,481213,481303,481497,481535,481810,481843,481869,481904,482093,482244,482341,482347,482493,482560,482581,482659,482758,482880,483197,483384,483402,483410,483601,483698,483763,483864,483986,484067,484116,484157,484250,484436,484455,484562,484780,485017,485335,485449,485615,485672,485705,486073,486089,486196,486325,486330,486475,486597,486782,486783,486836,486850,487017,487055,487075,487088,487125,487197,487253,487259,487433,487497,487504,487535,487629,487721,487820,487823,487900,487930,487966,488006,488082,488243,488756,488766,488820,488863,488953,489028,489055,489137,489226,489244,489267,489486,489778,489792,489942,490097,490202,490411,490690,490833,491012,491019,491062,491268,491269,491284,491374,491618,491866,491867,491951,492051,492225,492240,492355,492424,492541,492580,492601,492699,492986,493062,493089,493120,493175,493203,493259,493329,493380,493683,493952,494234,494376,494394,494489,494496,494576,494668,495116,495244,495263,495499,495502,495706,495722,495972,495993,496068,496171,496292,496301,496303,496388,496784,496936,497069,497112,497179,497205,497242,497511,497581,497814,497828,498037,498236,498569,498661,498742,498810,499078,499079,499549,499653,499809,499975,500041,500129,500212,500468,500511,500525,500705,500706,500847,500905,501090,501216,501283,501321,501339,501406,501432,501479,501579,501661,501716,502020,502022,502\n",
        "]\n",
        "\n",
        "L = L[1:100]"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "_cell_guid": "4d3ac345-ca3f-2917-2a22-3231496c199c"
      },
      "outputs": [],
      "source": [
        "my_list = []\n",
        "with open(\"../input/train_numeric.csv\", 'r') as f:\n",
        "    reader = csv.reader(f)\n",
        "    for i, line in enumerate(reader):\n",
        "        if i in L:    # or (i+2) in L: from your second example\n",
        "            my_list.append(line)\n",
        "            #print 'line[{}] = {}'.format(i, line)\n",
        "        if i > max(L):\n",
        "            break\n",
        "            \n",
        "df = pd.DataFrame(my_list)\n",
        "\n",
        "\n",
        "\n",
        "        "
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "_cell_guid": "73a36b91-abae-7e89-0d8f-469da278ded6"
      },
      "outputs": [],
      "source": [
        "df\n",
        "#df.to_csv('group_1_11915_74_37.csv')"
      ]
    }
  ],
  "metadata": {
    "_change_revision": 0,
    "_is_fork": false,
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.5.2"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}