
// Make newform 76.7.h.a in Magma, downloaded from the LMFDB on 17 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_76_h();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_76_h_Hecke();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_76_7_h_a();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_76_7_h_a();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [103372598905826219735270400, 0, 15152233769669432690883072, 0, 632563499034568748983104, 0, 6092313787108272225600, 0, 26741969359067432592, 0, 64290781142478432, 0, 90488614064544, 0, 75655761912, 0, 36670708, 0, 9460, 0, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-12111352741501111850222722592055418633724053259968732800, -325428923328640561626971716088461077927821105984876160, -1978850147009718081899274558960517319619263337359247072, 0, -76637231940627212517428619654434601351780876837309456, 0, -612319227864939661581255759951621324067735136422896, 0, -2096834346401585859115749872347083912220916649168, 0, -3706136712834942838551357253826801994133318560, 0, -3602618120115971921130311938884630400670784, 0, -1933927269950893557206561325734279591806, 0, -535621138076909334189617504820194899, 0, -59560215583689320669845838818999, 0], [107495491903425326390533307106858267599848357881398398003522560, 67247196328005965681787122177842820375349131020894658763449088, 0, 833974588970079385549265293410336289884519031386783102272448, 0, -33517235479201247433625993580797364272484387282036945158464, 0, -342313793549853194426777410943593934697250394318619639216, 0, -1263903639821420951006273034005366759301674841963304224, 0, -2311978149002530040950325774801573168142964793340384, 0, -2289134070821434019784230808370963926094725546648, 0, -1242264175905676375488060500261658162874133012, 0, -346436833570229317489655663704437525136436, 0, -38700922748273538374075673360799091387], [3000058037224688460696402803493816032648826779050098403388637886910065923006049665404160, -8674992622429630294702818434213351552395046458897481196701211229468330595169390500097024, 2273454444535900990870608508115151463270778215870835561711370634720143035505877674522816, -765921079267484167880823831087551283011376260802508153709266325452985988192643245379392, 150335289604143266766316952783671633496691729684029801023080380835445656065079804229728, -6541365297051205252510306168246840616652658731108411699862942583792393375247991911552, 1286062913270502451305618143050768909636762499538499850967795997173387243441414818688, -22196724161308437368518485505688413398308622683524081912478820595707322892195769936, 4516711656222948276200713480953587535931877623314147310943807004080159979393893184, -37152330415474247307870319589713716410934714831629406760807951782678145125473280, 8082800818546554092657790637511253211888587619643795542373637322020925144490160, -32010704491143791737823966961056034118021315678208673787310878110243571213008, 7911758307314500573104053794029861379200093809210834809971740368836124001952, -13000950559707847314393198558608984690677538481022081824711064384489746672, 4265256334226092439471932995242713913892963217221213392492412242279375428, -1129000021677923055792565851274746167986485763223473324792531593829068, 1184630269247458507862712107285444061036765289976497961448699616304902, 726522126632438484454955814636258525145033512549707191333684842252, 131986910600994943037558404267909005654806871226424638278663045532, 158638198648160745004315932334141098561495783538663430924223165], [-256851619503144236655365039214167602537095493849363747326822064182062196974114874685440, -135102866010847027462012879098671343715374114530997980100537507056123202267734205042432, -12792489461511065742753481423981903531588195327471613260659887830457453017429846626048, -6109003905064322672876432571412433961619091034851837354824347703201972812898882628544, -365258436764905930757345107152296191933227433716023019488871189183419748056700923904, -91210888221495264023857666932175186298640604255610349786097107755034679508190899520, -2836262165577022900450276501293038819063495163336247439478989449468428188509527744, -563480957618681759476082904469592697725783310681732249503660609694915165670455312, -9672701690545016905925558967480964335043351650687576707971451643857980250149632, -1731947102715326910026971000512324543774325260475074765201959698778937591556512, -17100458790118363319525159148507155713354961892283018331213211039430574574720, -2898790246455264587279301610927807196469042350863810264567741997205620305824, -16638618144630038402951029113195579289202134206168618754009035620863507296, -2733506518373150608959760544911440893255405629647785413656535692911040552, -8939958144624246424188440274405379790153801298270823985159579781350864, -1440842706893584886075768320318985081187073732155072294260965847341468, -2477881355917359883333449257473999310078848580808419009320464265856, -394432922036346940359264451010708850144304806249668068889252726980, -275703048363503883400991553227114007144197930480815713152312156, -43519213632877587912858070667401175321811333562612758213834361], [-256851619503144236655365039214167602537095493849363747326822064182062196974114874685440, 135102866010847027462012879098671343715374114530997980100537507056123202267734205042432, -12792489461511065742753481423981903531588195327471613260659887830457453017429846626048, 6109003905064322672876432571412433961619091034851837354824347703201972812898882628544, -365258436764905930757345107152296191933227433716023019488871189183419748056700923904, 91210888221495264023857666932175186298640604255610349786097107755034679508190899520, -2836262165577022900450276501293038819063495163336247439478989449468428188509527744, 563480957618681759476082904469592697725783310681732249503660609694915165670455312, -9672701690545016905925558967480964335043351650687576707971451643857980250149632, 1731947102715326910026971000512324543774325260475074765201959698778937591556512, -17100458790118363319525159148507155713354961892283018331213211039430574574720, 2898790246455264587279301610927807196469042350863810264567741997205620305824, -16638618144630038402951029113195579289202134206168618754009035620863507296, 2733506518373150608959760544911440893255405629647785413656535692911040552, -8939958144624246424188440274405379790153801298270823985159579781350864, 1440842706893584886075768320318985081187073732155072294260965847341468, -2477881355917359883333449257473999310078848580808419009320464265856, 394432922036346940359264451010708850144304806249668068889252726980, -275703048363503883400991553227114007144197930480815713152312156, 43519213632877587912858070667401175321811333562612758213834361], [32169992216668230682342088175494498161757122130183410328265468478551937081780242260459520, -19288200281566051174327252455208341228179854607507699402466318398065917266543521372221696, 691114587934923101861157916150147877534790795040873054846779947159292143692664211928320, -548298457370552990829733776013564168474202326397357285660361173989685059133043028382784, 20457034880832820105057844463439574251516401480440856133114548431093476141333522857600, -2532134474404056380495397057056716792453737463262986746417363703700330362362967667136, 160000475295339186690412472980326024571951706340371803150772969499672677246553058560, 972177531061620404261115776297094405902687354633909610543373104326185976317895568, 546234819495084945392784867371758503391451635505934828316696002170045603649383040, 29176886709212035940638685514260808996705246695030699497551087282763027010580576, 965635101365213802038259516358960573352077477949157039268867390582671920002560, 73327211742253071309975373316004926643970612125108236139742687689037899619488, 939327056538258655160398726837222590225335609223847626347956458252046342080, 82807710878015135949885532947559682531917776719301492911140276422239418120, 504584171494980857777587038797521271237529616212823150139531095715799120, 48137087794988554349050904010626177570506078829778225199466307755645900, 139828237979174107423238107670560758994233705110263247057370893549880, 13981551845292524546838373702858174923325218519199538716132454926676, 15555673933397415941911278546468974855284440199901167257140509680, 1603062534462401978501497091801291910865640578946410496468418473], [-32169992216668230682342088175494498161757122130183410328265468478551937081780242260459520, -19288200281566051174327252455208341228179854607507699402466318398065917266543521372221696, -691114587934923101861157916150147877534790795040873054846779947159292143692664211928320, -548298457370552990829733776013564168474202326397357285660361173989685059133043028382784, -20457034880832820105057844463439574251516401480440856133114548431093476141333522857600, -2532134474404056380495397057056716792453737463262986746417363703700330362362967667136, -160000475295339186690412472980326024571951706340371803150772969499672677246553058560, 972177531061620404261115776297094405902687354633909610543373104326185976317895568, -546234819495084945392784867371758503391451635505934828316696002170045603649383040, 29176886709212035940638685514260808996705246695030699497551087282763027010580576, -965635101365213802038259516358960573352077477949157039268867390582671920002560, 73327211742253071309975373316004926643970612125108236139742687689037899619488, -939327056538258655160398726837222590225335609223847626347956458252046342080, 82807710878015135949885532947559682531917776719301492911140276422239418120, -504584171494980857777587038797521271237529616212823150139531095715799120, 48137087794988554349050904010626177570506078829778225199466307755645900, -139828237979174107423238107670560758994233705110263247057370893549880, 13981551845292524546838373702858174923325218519199538716132454926676, -15555673933397415941911278546468974855284440199901167257140509680, 1603062534462401978501497091801291910865640578946410496468418473], [-99220702047384077840084557263165215196484706379716193337392836887314602714963705163832320, 49076911777722541470879524345258389523339090355518287437154207780067025434499918484851456, -6902102549244603667532901219944013588001167488950942759274635225925147944963077757360128, 3639637843695273976345260879860985466946274014156290986732086852113053812340458859426240, -37762739236997437984560751682109382650312667187418994342073629503680570661828860876544, 35627795387165936790408372022976359179253517920042088326330360659997160649336764612544, -17063302431866813991726494575357236270147021493492328872919605161786627150631046784, 151190665204281699306550579254946568068079490154777249309037931105318500638385048400, 294748387623050310907268994386037439586248567235751567460178613338040954644732928, 347590925162549273576089298866137722399256237647463020275517495773828711930171488, 816165845448832556174819322771836262687035052770798839461792759889510358081280, 468257331908859169406498836648150131778855207111311311301614034310071850609632, 947773367799057957337375463278229819855498826708711211037986015602808987584, 376967417329509774059784712853714448703923057796501028878042704205510588872, 557517811024910227433099170249188122358039855134565013775048034030657856, 177199995613256638380842384807184433801261616468374401138775488183897068, 162913503826320036920345313260054186299009366945412728026084686621584, 44620849117716823261534256031629387198770349028803027075704415014316, 18743536156108145295193591703439255040776255449848344714952611544, 4628729240970025810223785838935209555715817571651199270128903149], [99220702047384077840084557263165215196484706379716193337392836887314602714963705163832320, 49076911777722541470879524345258389523339090355518287437154207780067025434499918484851456, 6902102549244603667532901219944013588001167488950942759274635225925147944963077757360128, 3639637843695273976345260879860985466946274014156290986732086852113053812340458859426240, 37762739236997437984560751682109382650312667187418994342073629503680570661828860876544, 35627795387165936790408372022976359179253517920042088326330360659997160649336764612544, 17063302431866813991726494575357236270147021493492328872919605161786627150631046784, 151190665204281699306550579254946568068079490154777249309037931105318500638385048400, -294748387623050310907268994386037439586248567235751567460178613338040954644732928, 347590925162549273576089298866137722399256237647463020275517495773828711930171488, -816165845448832556174819322771836262687035052770798839461792759889510358081280, 468257331908859169406498836648150131778855207111311311301614034310071850609632, -947773367799057957337375463278229819855498826708711211037986015602808987584, 376967417329509774059784712853714448703923057796501028878042704205510588872, -557517811024910227433099170249188122358039855134565013775048034030657856, 177199995613256638380842384807184433801261616468374401138775488183897068, -162913503826320036920345313260054186299009366945412728026084686621584, 44620849117716823261534256031629387198770349028803027075704415014316, -18743536156108145295193591703439255040776255449848344714952611544, 4628729240970025810223785838935209555715817571651199270128903149], [33525354915357923578871234543835358517363792124766391504563684204381332816591731451686400, 19827339862465429421831977265189017196062308030630746270599098784145114987402286826964736, 3105493980654840282835871651896932855233188346955034852213927639382927900635206772715904, 1518014623907576178765531772426494482809469199330565764301202462750259576166865065995840, 8652852178082308939751453609334904199398132853489069104479540536293547260247669009472, 9617630731823880805084737190027541273210744696044096009495271857021158357505069173504, -71468586431736186349342989202484394150902342423439737138926682168943025047961005888, 12705475277562089618668094507131822356243401979390748190124630278006948261431607760, -420491603559067628150026930878897971488850101370843197888437307754043279147057984, -39774584273983665526882713831344400054241882844729232843302484397583288968482912, -890900473407023179106539419565398418019556265359977939365330075236091139041920, -142749453860980953406941237137853392739327646905375078571434848558580590262528, -943550212168658306248887095057726205040417217966279418692971236927427664832, -177883761864931065747262328666201126855210263333812933595747232775916016808, -531050991259945542605343104523354696797784735673694081957289564873228488, -108152541617410904141776381003806321013937904596182419869950771594455212, -151370870902747072171791710465307472646621536027837987541727790085732, -32207288988034427842006138125788815161627917824200111661253174339504, -17149605044752780618552435124954114948030347824874755986046560612, -3750448682308856874379905194704815127536712209453458606995553471], [-13451764365458095714315838004191076953058337491363829171031376878410646081718450552437760, -14525744218967640233083291417439099099371249883409949646893034541600119491203609955753728, 650928427530356569422278607390008791634740470645856127096513555321908464773635864762368, -523538065718474662369501241854907021530019029200503187606717135606052882253071515152064, -1264607710165575914806861539638050800611910592554789839120105939078719088352890689536, -18894693265888469135625577235341750924786060106243438165171936057329512068403957841344, -42022951074568091291888047233250487005583935090296104083756728396963319242543895296, -151439209357157531938467570598380463133828244977042347196213085422974918999402950672, -165456326438888952700454041208034707028634017387396353677790871743283103986494208, -520625806756241385665850623855896672595110965987522703321342920142424148300646560, -288251468935747644082011961668724908369973433747071656156452293702307790158400, -923119942696413727688134239116827779375058625479956823899174796832848634532576, -266316340887054098404536861105748631616184145471042104760922825390555224064, -899415492618434289627325581718184646436194927753086908664970363368029463304, -135193017049914386820547919481993900412169563306697796325346252261236736, -483605663445402710768316235030901029748596965549864894169315308278082796, -35553321395150047857789205220257896972922602373767506108396336665424, -134093094119043778274763842014405922104985462280875316761713186662796, -3778430939771406811661034858232550569363203995824870956277716224, -14923005897223407212663747369563817274315034464099684198372327265], [13451764365458095714315838004191076953058337491363829171031376878410646081718450552437760, -14525744218967640233083291417439099099371249883409949646893034541600119491203609955753728, -650928427530356569422278607390008791634740470645856127096513555321908464773635864762368, -523538065718474662369501241854907021530019029200503187606717135606052882253071515152064, 1264607710165575914806861539638050800611910592554789839120105939078719088352890689536, -18894693265888469135625577235341750924786060106243438165171936057329512068403957841344, 42022951074568091291888047233250487005583935090296104083756728396963319242543895296, -151439209357157531938467570598380463133828244977042347196213085422974918999402950672, 165456326438888952700454041208034707028634017387396353677790871743283103986494208, -520625806756241385665850623855896672595110965987522703321342920142424148300646560, 288251468935747644082011961668724908369973433747071656156452293702307790158400, -923119942696413727688134239116827779375058625479956823899174796832848634532576, 266316340887054098404536861105748631616184145471042104760922825390555224064, -899415492618434289627325581718184646436194927753086908664970363368029463304, 135193017049914386820547919481993900412169563306697796325346252261236736, -483605663445402710768316235030901029748596965549864894169315308278082796, 35553321395150047857789205220257896972922602373767506108396336665424, -134093094119043778274763842014405922104985462280875316761713186662796, 3778430939771406811661034858232550569363203995824870956277716224, -14923005897223407212663747369563817274315034464099684198372327265], [-100092693336121002501547995144575120939257162944936670617615459775729420327525524819744000, -15832686125474641824718936487975458227650399388028391009883373230727941984758875070962944, -7532905653599810673826694070420725390030504035228848567089252290033286875784340405417024, -1252905998671053226180165035263043675878044675834802467082530467802479559257896515069056, -59931963703858139342410052259222107152498600045445355981938634109476974619088452893952, -14062228164636494757664952893708621150630686564343766123338559879998302504494418194304, -177474989036724170688810628160372058360148631472734612785340024087335878519064757712, -68180257619520705707472768316634577369266744603587794471640400966759615731062918048, -211229001617750587883614731901056295168344831141127665318390800229017261571255456, -176687825048531811716491762220185957472479885225961824925387493025963633128140496, -21981713621702682921451689516301462845134254543811413566056391439378222161120, -263295184985555456115951304806484157635655163104469481894445152656237697385568, 171555354015575894725085993765740600090313962783773218187320098520573018952, -229646588005058698353685866690352832694457680479379881201676582811352389040, 155353755471378439420514955105144715210492795667041701733560346407154348, -114807158133313636648607362683751739238826953418354741340363129989934780, 54390655510256371894502596132981546612403410478935218070321685809912, -30295832424120555463194864787304405308077047448252356388599809791536, 6906161598995174325481728878318285014115919982617242798032018507, -3256627024386211116171039660220776683626071006243935857149597558], [-237169910212347683041581164599769237875126398942178942791708898743124061200216607436748800, -90882214045169208455870775455868329884749495438382024732516957224976615542034288561820928, -20959325699010949765511148049815007129290103029962165809438872366161461961545523270529792, -7051535070867609354265528731292633818325857667684552266985576480504312567241590698083136, -384243507479482748030443630978334684390963745767488033172317826221085887214250476040576, -75844781843013290206106125275377418197002393982780609185068681366501620389923534865728, -2504362198573332665649924733655417808868166882706959938731570753074886128165013734400, -352027876967391948674971759272912210965328913126677814303641163041768269736654846192, -7830987728746849622210901535238196697111106911594607875289829511946630673880803456, -876042961413464820096455333436741506886511928891330951908031007784186287562557024, -13192555315789583929436946681478021685381119694458640882871261206948669870336640, -1261034337704873095991377969482126815333536936442862561082853574911902312869216, -12475261039912593608745831939965030492814622745247518087854097335640623111680, -1070093608843324263563534703849814004051591285907255566873418839793962339640, -6584473401904735025318987579596177502243859989212735955279276722878503600, -523877955295751292436226565631969179148667108469280634110402837300075636, -1803704736665362927983282049717295342708311314874214147638638168591656, -136074358845772264082419796968268303170061715430451201539145779869460, -199076853534294641335755816178884823507604424200459556900110759840, -14453562759226715532102962528789150589742694575248911949870702703], [237169910212347683041581164599769237875126398942178942791708898743124061200216607436748800, -90882214045169208455870775455868329884749495438382024732516957224976615542034288561820928, 20959325699010949765511148049815007129290103029962165809438872366161461961545523270529792, -7051535070867609354265528731292633818325857667684552266985576480504312567241590698083136, 384243507479482748030443630978334684390963745767488033172317826221085887214250476040576, -75844781843013290206106125275377418197002393982780609185068681366501620389923534865728, 2504362198573332665649924733655417808868166882706959938731570753074886128165013734400, -352027876967391948674971759272912210965328913126677814303641163041768269736654846192, 7830987728746849622210901535238196697111106911594607875289829511946630673880803456, -876042961413464820096455333436741506886511928891330951908031007784186287562557024, 13192555315789583929436946681478021685381119694458640882871261206948669870336640, -1261034337704873095991377969482126815333536936442862561082853574911902312869216, 12475261039912593608745831939965030492814622745247518087854097335640623111680, -1070093608843324263563534703849814004051591285907255566873418839793962339640, 6584473401904735025318987579596177502243859989212735955279276722878503600, -523877955295751292436226565631969179148667108469280634110402837300075636, 1803704736665362927983282049717295342708311314874214147638638168591656, -136074358845772264082419796968268303170061715430451201539145779869460, 199076853534294641335755816178884823507604424200459556900110759840, -14453562759226715532102962528789150589742694575248911949870702703], [-21725120825153391296839473360635134061740069046115501138198557272346690702923382891520, -385715828460233790507510460579956683875588269386738154878228962082192467880589354015188736, 0, -30326490680569543443614549526862562600731337880859852250393382207213683378298253173014208, 0, -341317559335387961951185013978725173807976732429659896479801303741439036633588160954048, 0, -1659923200573072753053504796499634863807981210404978981170453302778442017759990560784, 0, -4312994141238558584171416930788268533682627229727543759418301750924578066171010400, 0, -6440366373157278229747829238692415950700362616718379002558877824064760788260512, 0, -5625862745894017216472624332705100298952320142199818038939298978931954110728, 0, -2815636124041216998290179347970369929427837629121263639716354401694988572, 0, -743596145111810120047494308807658391671609720889710515866760530560812, 0, -79979033999867693681596087783370923426476722246381468799204760625], [699778964337009973545520134726164537539047976801626700145378356175545022567970861450627840, -176599797418597625311068434819882168218740342282844530236298367838422298803280939251213056, 56140498493672693255607264317659014133048605673108519278935954352288637839302258804347968, -14016837584203492782416439585161071932456511181827284823099189721875531294349320944036096, 570667415071300587338620515825401534173467885316104172508109780370596165120722104461984, -141876479720050947302596353188597375859315109733879225087916713039829936275063748340512, 2524197540662835520206043294955856567077755138347537112898869504878301541476825189824, -619475169681883297705360636132721217210604838805654915543112993093741020211137988848, 6051755698974378119358094925019187687500989153911565251822653793637620782957504192, -1459400388161459133455878616340553517620074109218445164230171466654856587875715552, 8467910332615977762861482119807411679346613818641906236082352664909319711133600, -2006549406854106974607816211616051723852486432938140200099026627226604946605552, 7035005076078608843308080294122322931296617293813358316904619860464287147856, -1642056530017897223578948201675607174133397819694954103307332128858640854784, 3390158625124446000940027861820317348521164652541697860037570007149424284, -781841823664654269066962207609718740187959933471368999329240519979356296, 870237823780064502601536276616481717916496382444654784356748166533566, -198839475726397696024009567043293841412937487157038080199543854195658, 91614330242831643906039459084443818185106423589380718855314154876, -20785030528598869964069490433138788429408639546144141432960160901], [-585794625960082204154440104869338562761921195608846065712424104395608325603082806352952320, 486445664110538723525490026611897080145742385442604976186778496283411542758288378886731008, -52657726006429400223804673316741385821469454549107867688765004642560742923121782473334272, 38700281692504185075186687133340156694776410072698010218736176254044370200419842788512576, -957418374575270696612080971694496118481942984490258743353943533340480435129973702729856, 387341310905614798262932888183616833407147484031687096471581116771730450159648135118400, -6219455288725495506043117380558910081581982784482127089440720812177734314126685941696, 1673550590987632085103246931647794572996011194894446300011455607482030866002616315248, -19424750484401582461505071122122695388603634837204293208094730827430929916137212288, 3907807052490295176415301443698308639561572097639214628811279807230172706746792928, -32713554638915964730242259306799861742572227980036431244420970607057226886830240, 5335171754502452022296887042317303746763632703385382809638559970043088321515456, -30934741882106058451544083667318197786189041804100891347914993445318390649344, 4342699844272495380220618837936986009622710527888220950378266597633672301688, -16329034031526499115906358715613199145378030210535766718654104308616109216, 2059475238141940200561440533874402527754470445487206859125612640806277492, -4473606570450509799867693902254783014298855953640496791709441555954464, 522218552850682013027370696759707568779088391192461975331167560440380, -493814845414785773514024206362630690206715394943383003119766341924, 54467718164940394632352429095364185880435338978504127956350050479]];
    Rf_basisdens := [1, 1, 650857846657281123253943432176922155855642211969752320, 214990983806850652781066614213716535199696715762796796007045120, 10862560412576695648419736680317567030870034523057750569099278636173345351461691445760, 2069059126205084885413283177203346101118101813915762013161767359271113400278417418240, 2069059126205084885413283177203346101118101813915762013161767359271113400278417418240, 43450241650306782593678946721270268123480138092231002276397114544693381405846765783040, 43450241650306782593678946721270268123480138092231002276397114544693381405846765783040, 43450241650306782593678946721270268123480138092231002276397114544693381405846765783040, 43450241650306782593678946721270268123480138092231002276397114544693381405846765783040, 21725120825153391296839473360635134061740069046115501138198557272346690702923382891520, 43450241650306782593678946721270268123480138092231002276397114544693381405846765783040, 43450241650306782593678946721270268123480138092231002276397114544693381405846765783040, 3620853470858898549473245560105855676956678174352583523033092878724448450487230481920, 8690048330061356518735789344254053624696027618446200455279422908938676281169353156608, 8690048330061356518735789344254053624696027618446200455279422908938676281169353156608, 43450241650306782593678946721270268123480138092231002276397114544693381405846765783040, 10862560412576695648419736680317567030870034523057750569099278636173345351461691445760, 21725120825153391296839473360635134061740069046115501138198557272346690702923382891520];
    Rf_basisnums := ChangeUniverse([[z : z in elt] : elt in Rf_num], Kf);
    Rfbasis := [Rf_basisnums[i]/Rf_basisdens[i] : i in [1..Degree(Kf)]];
    inp_vec := Vector(Rfbasis)*ChangeRing(Transpose(Matrix([[elt : elt in row] : row in input])),Kf);
    return Eltseq(inp_vec);
end function;


// To make the character of type GrpDrchElt, type "MakeCharacter_76_h();"
function MakeCharacter_76_h()
    N := 76;
    order := 6;
    char_gens := [39, 21];
    v := [6, 1];
    // chi(gens[i]) = zeta^v[i]
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    F := CyclotomicField(order);
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),[F|F.1^e:e in v]);
    return MinimalBaseRingCharacter(chi);
end function;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_76_h_Hecke();"
function MakeCharacter_76_h_Hecke(Kf)
    N := 76;
    order := 6;
    char_gens := [39, 21];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := true, Kf := Kf); // the value of chi on the gens as elements in the Hecke field
    F := Universe(values);// the Hecke field
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),values);
    return chi;
end function;


function ExtendMultiplicatively(weight, aps, character)
    prec := NextPrime(NthPrime(#aps)) - 1; // we will able to figure out a_0 ... a_prec
    primes := PrimesUpTo(prec);
    prime_powers := primes;
    assert #primes eq #aps;
    log_prec := Floor(Log(prec)/Log(2)); // prec < 2^(log_prec+1)
    F := Universe(aps);
    FXY<X, Y> := PolynomialRing(F, 2);
    // 1/(1 - a_p T + p^(weight - 1) * char(p) T^2) = 1 + a_p T + a_{p^2} T^2 + ...
    R<T> := PowerSeriesRing(FXY : Precision := log_prec + 1);
    recursion := Coefficients(1/(1 - X*T + Y*T^2));
    coeffs := [F!0: i in [1..(prec+1)]];
    coeffs[1] := 1; //a_1
    for i := 1 to #primes do
        p := primes[i];
        coeffs[p] := aps[i];
        b := p^(weight - 1) * F!character(p);
        r := 2;
        p_power := p * p;
        //deals with powers of p
        while p_power le prec do
            Append(~prime_powers, p_power);
            coeffs[p_power] := Evaluate(recursion[r + 1], [aps[i], b]);
            p_power *:= p;
            r +:= 1;
        end while;    
    end for;
    Sort(~prime_powers);
    for pp in prime_powers do
        for k := 1 to Floor(prec/pp) do
            if GCD(k, pp) eq 1 then
                coeffs[pp*k] := coeffs[pp]*coeffs[k];
            end if;
        end for;
    end for;
    return coeffs;
end function;


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 7;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-6, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-183, -2, -4, 0, 0, 2, 2, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0], [-477, -1, 2, 238, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0], [113, -7, 6, -113, 0, 0, 2, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0], [249, 45, 35, -285, 1, -5, 0, 1, -1, 1, -1, 0, 1, -2, -1, -1, 1, 1, 0, 1], [0, 80, 41, 83, 0, 1, 0, 0, -4, 0, 1, 0, 4, -1, 0, 0, 1, 0, 1, 2], [-726, 1, -91, 362, -5, 3, 2, -2, 1, 2, -1, -5, -2, 5, 2, 2, -5, -2, 1, 0], [-3465, -33, 3, 6926, 0, -36, 36, 1, 0, 10, 9, 1, 8, 5, 0, -2, 1, -4, 0, 3], [-5433, 51, 2, 10851, 0, -46, 46, 18, 26, 8, 16, -8, -10, -12, 0, 0, 2, -15, 0, 2], [3660, -101, -99, 3640, 0, -48, -34, -27, 54, -36, 72, 0, 16, -8, 20, -4, 2, 0, 2, 2], [11046, 488, -445, -11035, -9, -11, 100, -33, 9, -7, 9, -18, 0, 22, -11, 0, 3, 22, -2, 2], [2, 33, 18, 10803, -5, -125, 0, 0, 35, 0, -174, 5, 28, -2, 2, 4, 2, 2, 2, 4], [16981, 2, -49, -8486, 11, 110, 238, -94, 47, 358, -179, 11, 10, -19, -9, -4, 7, 9, 1, 0], [-20249, -992, -993, -20246, -11, -547, -272, 101, -213, 109, -229, 0, -14, 7, -3, 2, -1, 0, -10, -10], [-20, 1490, 742, 4396, 0, 793, 0, 0, -124, 0, 234, 0, 122, 10, -20, 6, -10, -20, -10, -20], [-55935, 10, 2822, 27981, 32, -81, -108, 192, -96, 248, -124, 32, -27, 39, -27, -15, 45, 27, -15, 0], [12286, -1240, -1266, 12314, 26, -374, -173, -62, 150, -42, 110, 0, -40, 20, -28, 52, -26, 0, -21, -21], [85346, 3143, -3105, -85340, 9, -6, 78, -208, -9, -521, -9, 18, 0, -54, -6, 0, 44, 12, 11, -11], [57160, 1008, 986, 57218, -8, 200, 129, -170, 332, -430, 852, 0, 48, -24, -58, 44, -22, 0, -21, -21], [21750, 1652, 3092, 53, -118, -198, -92, 235, -294, -1011, 952, -59, 44, -56, -106, 17, -5, 53, -24, -12], [33486, 81, 9550, -16693, 24, -2172, -4144, -14, 7, -352, 176, 24, -66, 146, -100, -5, -4, 100, 14, 0], [-5027, -8998, -8992, -5011, 133, -6552, -3268, 237, -341, 425, -717, 0, 96, -48, -16, -12, 6, 0, 33, 33], [-148, -19791, -9763, 79810, -25, 3447, 0, 0, -141, 0, -1093, 25, 250, -31, -148, -30, 31, -148, 31, 62], [-66848, 2148, 102, 133630, 0, 1960, -1960, 146, 40, -954, -1060, 106, 102, 0, 0, -44, 58, -66, 0, 102], [75564, -8274, 166, -150978, 0, 850, -850, -300, -244, 738, 794, -56, -164, -330, 0, -46, 120, 150, 0, 166], [4468, -11258, -11190, 4523, 54, -3441, -1693, 158, -262, 82, -110, 0, 152, -76, -55, -136, 68, 0, 74, 74], [155623, 15518, 61, -310902, 0, -1854, 1854, -499, -306, 129, 322, -193, 392, 331, 0, -59, 2, 344, 0, 61], [-186814, 138, 31113, 93360, -284, -3969, -8126, -292, 146, -1228, 614, -284, -498, 915, 94, 52, -23, -94, -81, 0], [-224597, 289, -631, 224609, 120, -12, 584, 1278, -120, -1090, -120, 240, 0, 46, -12, 0, -126, 24, -110, 110], [-178, 22199, 11095, 173571, 39, 7684, 0, 0, 1605, 0, -239, -39, -176, -9, -178, 166, 9, -178, 9, 18], [363, -72945, -36677, -377671, 81, 8757, 0, 0, 505, 0, 1867, -81, -71, -10, 363, -15, 10, 363, 10, 20], [-302472, 47966, -48848, 302160, 139, 312, 6349, 1395, -139, 1161, -139, 278, 0, -606, 312, 0, 20, -624, 47, -47], [397955, 12694, 34, -796730, 0, 250, -250, -1524, -1720, -549, -745, 196, -226, -260, 0, 202, 236, -820, 0, 34], [-38168, -14708, 15788, 38649, -51, -481, 6039, 389, 51, 1649, 51, -102, 0, 880, -481, 0, 16, 962, 175, -175], [411917, -21116, -42792, 568, 528, 7806, 8942, 1314, -1050, 6762, -6498, 264, 311, -359, -1136, 44, 4, 568, -96, -48], [1758436, 1557, 1024, -878408, -155, -2451, -1662, -1574, 787, -9474, 4737, -155, 824, -1976, -1620, 218, -108, 1620, -328, 0], [668208, -157382, -157548, 668425, 135, -8707, -4245, -159, 453, -2133, 4401, 0, 612, -306, -217, 332, -166, 0, -145, -145], [-612470, 7869, 27, 1225945, 0, 2442, -2442, 1922, 1346, 4420, 3844, 576, -628, -655, 0, 57, 84, 1005, 0, 27], [-1151464, 118, 128924, 575752, 340, -2953, -5826, 820, -410, -6624, 3312, 340, 1088, -1958, -40, -418, 618, 40, 218, 0], [776514, -18152, -36532, -172, -824, -1366, -1710, -900, 488, 1178, -1590, -412, -3278, 3026, 344, 22, 230, -172, -504, -252], [644003, 72389, 72452, 644511, 121, -8184, -3838, -1850, 3821, 387, -653, 0, 2248, -1124, -508, -126, 63, 0, -321, -321], [-583657, 69025, 137860, -401, -1060, 8006, 7204, -2786, 2256, 11358, -11888, -530, -2854, 2786, 802, 620, -552, -401, -136, -68], [-272, 231825, 115486, 1105890, 807, -1955, 0, 0, 4447, 0, 17609, -807, -1490, 276, -272, -234, -276, -272, -276, -552], [480710, -193347, -192883, 480608, 908, 53126, 26512, 2428, -3948, -1638, 4184, 0, -522, 261, 102, -928, 464, 0, 192, 192], [-369287, -27808, -27876, -367719, 1791, 23514, 12541, 465, 861, -1586, 4963, 0, 2172, -1086, -1568, 136, -68, 0, 640, 640], [1706614, -38517, 935, -3411789, 0, 11258, -11258, 3720, 3858, -2624, -2486, -138, -2016, -2951, 0, -523, 412, 1439, 0, 935], [3421256, 6371, 12567, -366, -334, 30304, 29572, -1883, 1716, -855, 688, -167, 876, -303, 732, 382, -955, -366, 1146, 573], [-802748, -4509, 5855, 802906, -158, -158, -62138, -3327, 158, -828, 158, -316, 0, 68, -158, 0, 714, 316, -1110, 1110], [-1475270, -52649, -100283, -3240, -1242, 13740, 7260, 11097, -11718, 3197, -3818, -621, -1214, 1437, 6480, 136, -359, -3240, 446, 223], [-827048, 2818, 159167, 414484, -1306, 12360, 28560, -6954, 3477, 12520, -6260, -1306, -2538, 4680, -1920, 408, -420, 1920, -396, 0], [150, 151825, 76396, -4847273, -267, -36588, 0, 0, -8233, 0, 8061, 267, -3382, -627, 150, 404, 627, 150, 627, 1254], [-9488806, -3167, 94736, 4743058, -1157, 25474, 45568, -1468, 734, -16346, 8173, -1157, 240, -2669, 2690, 1634, -1079, -2690, -2189, 0], [1246225, 169204, -165174, -1243561, 223, -2664, 5559, -1961, -223, -3414, -223, 446, 0, 4838, -2664, 0, -852, 5328, -328, 328], [1805570, -73728, -74340, 1804391, -1950, 3569, 1195, -9416, 16882, -22900, 43850, 0, -8524, 4262, 1179, 1224, -612, 0, 438, 438], [-2946315, -62230, 59818, 2944003, -587, 2312, -72991, -895, 587, -4690, 587, -1174, 0, -500, 2312, 0, 1038, -4624, 812, -812], [8148555, 14583, 30472, -191, 1208, -68878, -69260, -1664, 2268, -27432, 28036, 604, 3684, -3400, 382, 904, -1188, -191, 568, 284], [2236892, 2487, -9858, -1117052, -679, -14522, -23468, 6924, -3462, 7814, -3907, -679, -2366, 1981, -2788, 980, 791, 2788, -2751, 0], [5271053, 55997, -58477, -5271577, 1148, 524, 26854, -1852, -1148, -16776, -1148, 2296, 0, 9564, 524, 0, 864, -1048, 976, -976], [-2327387, 293779, 1520, 4660455, 0, -51502, 51502, -9788, -9260, -6292, -5764, -528, 374, -1146, 0, -80, 1440, 5681, 0, 1520], [368399, 20800, 21981, 372514, -165, -131255, -63570, 9803, -19771, 6525, -13215, 0, 9414, -4707, -4115, -2362, 1181, 0, -1244, -1244], [4026355, -28483, -55695, 1696, 4150, -52806, -49414, 6105, -4030, -49386, 51461, 2075, 10842, -11355, -3392, 2892, -2379, 1696, -1026, -513], [168, -219920, -112493, 130778, -256, 48730, 0, 0, -14891, 0, -71252, 256, -9776, 1282, 168, 2590, -1282, 168, -1282, -2564], [-7385933, -3523, -240790, 3690394, -2428, -594, -11478, -9892, 4946, 36640, -18320, -2428, -3364, 4962, 5145, 806, 154, -5145, -1766, 0], [-9396480, -250097, -1723, 18791835, 0, 64770, -64770, 2164, 4888, -36736, -34012, -2724, 4546, 6269, 0, 1309, -414, -1125, 0, -1723], [-7138245, 132026, 128404, -7140777, 2763, -60236, -31384, 795, 1173, 7127, -11491, 0, -1604, 802, 2532, 7244, -3622, 0, -1397, -1397], [719601, -10126, 27619, -710946, -313, -8655, 84952, -11697, 313, -60585, 313, -626, 0, -8503, -8655, 0, -443, 17310, -1760, 1760], [3029452, -12581, -16549, -2070, 5850, 84168, 80028, -19103, 22028, 12653, -9728, 2925, -4876, 6253, 4140, -3654, 2277, -2070, 2754, 1377], [21812837, 57236, 115397, -1322, -3590, -51770, -54414, -20883, 19088, -58045, 56250, -1795, -9400, 7529, 2644, 967, 904, -1322, -3742, -1871], [14884407, 86664, -78834, -14884689, -3681, 282, 27319, 26655, 3681, -30030, 3681, -7362, 0, -11532, 282, 0, 1032, -564, -468, 468], [-1844, 168131, 88868, -29755417, -3417, -72447, 0, 0, 13153, 0, 14212, 3417, -18600, -664, -1844, -3016, 664, -1844, 664, 1328], [-6006292, 622142, -478, 11999022, 0, 27594, -27594, -10526, -2384, -25794, -17652, -8142, -150, 328, 0, -2790, -3268, -13562, 0, -478], [21136551, -26823, -67, -42277433, 0, -22282, 22282, -14286, -9624, 7424, 12086, -4662, -3755, -3688, 0, -1915, -1982, -4331, 0, -67], [-5159333, -456468, -456876, -5175495, -2148, 11224, -2469, 6036, -14220, 26399, -54946, 0, -13876, 6938, 16162, 816, -408, 0, 1783, 1783], [-2307, -646702, -321555, 12943660, 8011, 72540, 0, 0, -24767, 0, 5309, -8011, 9422, -2177, -2307, -4942, 2177, -2307, 2177, 4354], [14746312, -165034, 175106, -14748250, -7010, 1938, -107549, 7588, 7010, 37726, 7010, -14020, 0, 40970, 1938, 0, -72, -3876, -578, 578], [15093231, 856748, 855114, 15091583, -2329, -372384, -187016, -2669, 3009, 16243, -34815, 0, -24868, 12434, 1648, 3268, -1634, 0, 617, 617], [-48273166, 5601, -1289802, 24142378, 6227, -70016, -116852, -22288, 11144, -98354, 49177, 6227, 812, -1917, -11590, -238, 769, 11590, -293, 0], [44305054, 178832, 350870, 1500, -2724, -224902, -221902, 24026, -25388, 25486, -26848, -1362, -5818, 6888, -3000, 4416, -5486, 1500, 2140, 1070], [7886768, -693730, -689570, 7895846, -1306, 89124, 49101, 6530, -14366, 8448, -18202, 0, 46064, -23032, -9078, -8320, 4160, 0, 5588, 5588], [-10929106, -1722, -1780145, 5463206, -2252, -30161, -65710, 2208, -1104, 58000, -29000, -2252, 11932, -25575, 2694, 1280, -849, -2694, -1711, 0], [38173106, 9542, -123275, -19083285, 719, 100694, 214460, -11872, 5936, -103418, 51709, 719, 18146, -38441, -6536, -3725, 9599, 6536, -2149, 0], [21156627, 2637374, 2639604, 21152187, 1550, -81774, -43107, 24998, -48446, -50223, 101996, 0, 16532, -8266, 4440, -4460, 2230, 0, -137, -137], [-6062, 730489, 367882, -50355845, -3771, -61816, 0, 0, 47133, 0, 166389, 3771, 5484, 737, -6062, 3084, -737, -6062, -737, -1474], [-12335388, 681852, -7608, 24677548, 0, 65950, -65950, 911, -1623, -46170, -48704, 2534, 17256, 24864, 0, 2861, -4747, 6772, 0, -7608], [62074904, -258571, -510675, -726, 186, 176390, 174938, -4252, 4345, -1369, 1462, 93, -6696, 1867, 1452, 4817, 12, -726, -9658, -4829], [-15437636, 925134, -949932, 15423663, -5728, 13973, 8111, -16300, 5728, -76596, 5728, -11456, 0, -13386, 13973, 0, -8308, -27946, 6786, -6786], [-19176126, -1106411, -2180271, -7860, 15126, 258528, 242808, 69173, -61610, 65557, -57994, 7563, -29756, 28051, 15720, -2058, 3763, -7860, -3410, -1705], [30403401, 305004, 644572, -15928, -2384, 434250, 402394, 23614, -24806, 44628, -45820, -1192, -10179, 5087, 31856, -2464, 7556, -15928, -10184, -5092], [-21438, -1010937, -502634, -25329598, -1937, 218193, 0, 0, 23927, 0, 96265, 1937, 9472, 6128, -21438, 5450, -6128, -21438, -6128, -12256], [-9145217, 1470240, 7142, 18299658, 0, -6610, 6610, 2258, -7764, -47679, -57701, 10022, -30736, -37878, 0, 3904, 11046, 9224, 0, 7142], [10591302, -753172, 771215, -10576693, 6058, -14609, 337382, -36982, -6058, 11832, -6058, 12116, 0, -17608, -14609, 0, 941, 29218, 1377, -1377], [-25329097, -188199, 224691, 25340339, -5937, -11242, 319610, -41043, 5937, 77141, 5937, -11874, 0, 12562, -11242, 0, 2134, 22484, 825, -825], [5242, 43122, 17001, 31527957, 522, 235555, 0, 0, -61506, 0, 105917, -522, 16462, 4035, 5242, -4714, -4035, 5242, -4035, -8070], [51628821, -18695, 967300, -25812704, 29780, 180540, 367906, -21044, 10522, -229296, 114648, 29780, -2664, 24398, -3413, -7672, -3726, 3413, 19070, 0], [-45602059, 2084999, -11616, 91224882, 0, -122122, 122122, -15958, -6, 118660, 134612, -15952, -3402, 8214, 0, 6489, -5127, 20764, 0, -11616], [-134032023, 1980, 430302, 67013398, -4418, 27455, 44456, 23212, -11606, -42056, 21028, -4418, 47044, -93885, 5227, -2789, 5375, -5227, 203, 0], [-5821, -3105617, -1539220, 62241156, -266, -187372, 0, 0, 45944, 0, 24812, 266, -78738, -1926, -5821, -17238, 1926, -5821, 1926, 3852], [24197873, -4415, 1099, -12101864, -20373, -233053, -477816, 59486, -29743, 117278, -58639, -20373, -3468, 3244, 5855, 18933, -34174, -5855, -3692, 0], [10243, 1608400, 805247, -115282062, 11517, -182228, 0, 0, 96405, 0, 158609, -11517, 49772, -4851, 10243, -14152, 4851, 10243, 4851, 9702], [-40404780, 365753, -13735, 80790843, 0, -223606, 223606, 56882, 60378, 42374, 45870, -3496, -15482, -1747, 0, -4255, -17990, -18717, 0, -13735], [65483465, 1846797, -7216, -131005572, 0, 77140, -77140, 489, 3113, -39094, -36470, -2624, 37438, 44654, 0, -5448, -12664, -38642, 0, -7216], [105908220, 481157, 1005045, -28589, -12436, -233848, -291026, 49714, -55932, -32066, 25848, -6218, 7188, -5177, 57178, -6341, 4330, -28589, 4022, 2011], [-4901491, 844354, 1703259, -20640, -37954, 960630, 919350, -81471, 62494, -224455, 205478, -18977, -78264, 67039, 41280, 26235, -15010, -20640, -22450, -11225], [80896096, 1426334, -1442839, -80908417, -4360, 12321, 592146, 13210, 4360, 278466, 4360, -8720, 0, -17520, 12321, 0, -583, -24642, -3401, 3401], [-20432, 1507318, 748799, -60636042, 22018, -696196, 0, 0, 54913, 0, 380496, -22018, -70874, 4598, -20432, -1062, -4598, -20432, -4598, -9196], [-171455956, 9588, 2757755, 85734659, 14828, -177573, -328422, -119392, 59696, 45150, -22575, 14828, -5012, 25439, -13362, -11054, 6693, 13362, 15415, 0], [-22282078, -1370874, 19906, 44579944, 0, 64038, -64038, -62003, -69121, 220146, 213028, 7118, -11866, -31772, 0, 927, 20833, 15788, 0, 19906], [63951077, -2074486, 17676, -127921766, 0, -430362, 430362, 37682, 11270, 80115, 53703, 26412, -9630, -27306, 0, -3098, 14578, -19612, 0, 17676], [-52598908, 921544, -938868, 52605047, 4734, -6139, -796383, 6856, -4734, 224754, -4734, 9468, 0, 94340, -6139, 0, -20134, 12278, -1672, 1672], [23762, -714503, -357557, 68984917, -10933, 8216, 0, 0, -23921, 0, -254181, 10933, 48164, -10295, 23762, 8372, 10295, 23762, 10295, 20590], [117145564, -719210, -1420598, -2616, 15448, -1390, -6622, -5820, 13544, -154542, 162266, 7724, 3512, -654, 5232, -33922, 31064, -2616, 5716, 2858], [-9112, 2305279, 1154170, -65088433, 7483, -345505, 0, 0, 142603, 0, -61690, -7483, 75782, -5420, -9112, 9408, 5420, -9112, 5420, 10840], [-66982638, -4436403, -4433757, -66989654, 41905, 567080, 280032, 47098, -52291, 87967, -134029, 0, -39064, 19532, 7016, -5292, 2646, 0, -6173, -6173], [-11457751, 3226995, -3234547, 11463175, -4717, -5424, -755678, 72453, 4717, -76753, 4717, -9434, 0, 11398, -5424, 0, -27834, 10848, 7591, -7591], [150596320, 1404832, 2785786, 23086, 16916, 238062, 284234, 76554, -68096, 94170, -85712, 8458, -50260, 44882, -46172, 5634, -256, 23086, -10756, -5378], [21533590, 3965727, 7940849, -12870, -4606, -595164, -620904, -40767, 38464, -213331, 211028, -2303, 38164, -26425, 25740, -34292, 22553, -12870, 23478, 11739], [12742047, 16846, 1801784, -6367002, 19718, -66725, -117364, -180544, 90272, 614468, -307234, 19718, 62566, -104767, -8043, -28521, 36677, 8043, 20365, 0], [37030544, -66959, 1593407, -18539756, 21901, -570369, -1238674, 82418, -41209, 661954, -330977, 21901, -8240, 4657, 48968, -3910, 19643, -48968, -11823, 0], [-77054557, 6049423, 3952, 154126200, 0, -161616, 161616, 20755, 16533, -271774, -275996, 4222, -50820, -54772, 0, 15298, 19250, 17086, 0, 3952], [-14801252, -3644211, 5177, 29649400, 0, 221730, -221730, -113827, -128664, 88573, 73736, 14837, 31498, 26321, 0, -6926, -1749, 46896, 0, 5177], [96568534, -2213685, -44561, -193186596, 0, 898548, -898548, 3381, -11192, -101933, -116506, 14573, -32374, 12187, 0, 17760, -26801, -49528, 0, -44561], [82753022, -1233234, -2557246, 62892, 34960, 922766, 1048550, -165196, 182676, 9464, 8016, 17480, -38844, 38798, -125784, -8014, 8060, 62892, -92, -46], [61361052, -2165902, 2168240, -61358662, -6329, -2390, 1027715, 103283, 6329, 208377, 6329, -12658, 0, 82820, -2390, 0, -15100, 4780, 12027, -12027], [-39214, -2900526, -1458250, -159117966, 28490, -310403, 0, 0, 59288, 0, -8458, -28490, -44238, -32, -39214, 26762, 32, -39214, 32, 64], [24974152, 5362418, -5366926, -24957280, 32051, -16872, 14295, -14981, -32051, -515655, -32051, 64102, 0, 67998, -16872, 0, 25850, 33744, 21412, -21412], [-127265970, -4962116, 4883974, 127223188, -6419, 42782, -857039, -56255, 6419, 417277, 6419, -12838, 0, -65262, 42782, 0, -5416, -85564, -9360, 9360], [99241531, 1238561, 2578550, -22741, 44892, 1008062, 962580, 139026, -116580, 12744, 9702, 22446, 23298, -34352, 45482, -23394, 34448, -22741, -22108, -11054], [133237991, 3011762, -3131293, -133274240, 17413, 36249, -1469734, -99155, -17413, 112717, -17413, 34826, 0, 63909, 36249, 0, -12207, -72498, 15746, -15746], [97473425, -2423214, -2414616, 97482829, 13507, -731358, -360977, 50989, -88471, 352220, -690933, 0, 105056, -52528, -9404, -17196, 8598, 0, -10146, -10146], [-128479320, 131878, 4326673, 64273616, -60624, -225263, -314702, -357360, 178680, -430164, 215082, -60624, -54066, 112923, -67912, -3342, 1893, 67912, 4791, 0], [46249276, 4643244, -4543244, -46212933, 1881, -36343, -972807, -70783, -1881, 455615, -1881, 3762, 0, -46212, -36343, 0, 31076, 72686, -30109, 30109], [86712565, 832032, 1787083, -43402, 44630, 495662, 408858, 145625, -123310, 569211, -546896, 22315, 75364, -66949, 86804, -18377, 9962, -43402, 16830, 8415], [12390, -1357172, -665393, 122832991, -10677, -869604, 0, 0, 45276, 0, 494717, 10677, 112212, 3127, 12390, -34353, -3127, 12390, -3127, -6254], [-68371996, 22972, 6774964, 34209300, 16496, -183473, -273738, -84640, 42320, 66452, -33226, 16496, 5786, 19894, -46604, 7136, -45738, 46604, 31466, 0], [-33974998, -2310705, 49217, 67977733, 0, 637666, -637666, -120996, -89980, 169276, 200292, -31016, 31760, -17457, 0, 6555, 55772, 27737, 0, 49217], [27914317, 3048099, 47272, -55882811, 0, -216222, 216222, 262100, 258022, -208796, -212874, 4078, 1208, -46064, 0, -18196, 29076, -54177, 0, 47272], [84371840, 1666876, 3272630, 28992, 22796, 635958, 693942, 207365, -195967, 697932, -686534, 11398, -70592, 96526, -57984, -39635, 13701, 28992, 51868, 25934], [-29906433, -179202, -337024, 14871760, 9360, -944767, -2215360, -310212, 155106, 166052, -83026, 9360, -114786, 227203, 162913, 6929, -11489, -162913, -2369, 0], [55963, 5535223, 2790446, -48083112, 12948, 758002, 0, 0, -155184, 0, 322622, -12948, 134108, -28434, 55963, -57712, 28434, 55963, 28434, 56868], [21664, -9588605, -4774194, -221551170, 9187, 952393, 0, 0, -174135, 0, -320949, -9187, 35368, -11630, 21664, -47808, 11630, 21664, 11630, 23260], [-148822638, 53845, 4058520, 74402425, -98567, -263162, -561900, -8050, 4025, -294566, 147283, -98567, -61484, 65641, 17788, 26934, 3459, -17788, -57327, 0], [-55659144, -7082160, -36390, 111262178, 0, -684550, 684550, 220288, 222832, -532004, -529460, -2544, -130232, -93842, 0, 21600, -14790, -56110, 0, -36390], [19149847, -2166548, -2175624, 19033009, 13353, 2181380, 1032271, -304479, 622311, -103078, 219509, 0, -588, 294, 116838, 18152, -9076, 0, 16380, 16380], [59788698, -3483158, 3453846, -59808017, -23405, 19319, -3449215, -208987, 23405, -135769, 23405, -46810, 0, 27546, 19319, 0, -37484, -38638, 9429, -9429], [-56419805, -8266400, -8257332, -56468215, -40750, -2719410, -1383910, 140466, -321682, 109958, -260666, 0, -221256, 110628, 48410, -18136, 9068, 0, 22266, 22266], [-61520, 2282190, 1145991, -126344519, 33004, 1979140, 0, 0, 145048, 0, -248668, -33004, -173926, 22718, -61520, -26712, -22718, -61520, -22718, -45436], [-61327471, -11040439, 38605, 122629408, 0, -657188, 657188, 112753, 68330, 639538, 595115, 44423, -25008, -63613, 0, 6706, 45311, -25534, 0, 38605], [-16101178, -9226028, -9235778, -16266762, -76621, -2785042, -1475313, -175127, 273633, 562707, -1202035, 0, -464688, 232344, 165584, 19500, -9750, 0, -3449, -3449], [-52191816, 2925880, 5848238, -40304, -60584, -2086882, -2167490, 35367, -65659, 10432, -40724, -30292, -158854, 182400, 80608, -49423, 25877, -40304, 47092, 23546], [-44136, 3018153, 1525514, 140787025, 6005, -2503788, 0, 0, 567235, 0, 47523, -6005, -73146, -4269, -44136, 13794, 4269, -44136, 4269, 8538], [-66819506, 141809, -4457904, 33484576, -35373, 117919, 535130, 697114, -348557, 1134402, -567201, -35373, -102202, 130580, -149646, 43210, -12596, 149646, -73824, 0], [23863501, 3401800, 3416047, 23672806, 3059, -2217689, -1204192, -198187, 399433, -83789, 170637, 0, 15042, -7521, 190695, -28494, 14247, 0, -34030, -34030], [44763695, 1044650, 31786, -89290626, 0, 240094, -240094, -45946, -80908, -419729, -454691, 34962, -109488, -141274, 0, 24746, 56532, 236764, 0, 31786], [-123077446, -5786724, -11575082, -36632, -43116, 3820306, 3747042, 659440, -680998, 550948, -572506, -21558, 198128, -166346, 73264, -15282, -16500, -36632, 63564, 31782], [-76265689, -6154914, 6047604, 76251355, 3368, 14334, 117732, 167820, -3368, -639824, -3368, 6736, 0, -64636, 14334, 0, -71906, -28668, 53502, -53502], [60006, 8351997, 4137506, 153784348, -2107, 226476, 0, 0, -79274, 0, 156751, 2107, 298632, -2931, 60006, 24948, 2931, 60006, 2931, 5862], [254727201, 279388, -6289089, -127200026, 45169, -1650660, -2647022, 124538, -62269, 1334674, -667337, 45169, 125030, -245191, -327149, 2592, -10053, 327149, 4869, 0], [-126494148, -2586220, 2683933, 126538715, 4151, -44567, 1446190, 534175, -4151, -402565, -4151, 8302, 0, -258142, -44567, 0, 16881, 89134, -65454, 65454], [94543862, -8595419, -8545107, 94666542, 24795, -1136300, -506810, 44002, -63209, -338317, 701429, 0, 388856, -194428, -122680, -100624, 50312, 0, 29807, 29807], [-147070176, -982984, 837086, 147003422, -6606, 66754, -3219281, 642402, 6606, -4638, 6606, -13212, 0, -298970, 66754, 0, -25602, -133508, -8339, 8339], [27120239, 11979800, 11936379, 27092726, -36157, -4384079, -2205796, -280583, 525009, 614711, -1265579, 0, -389906, 194953, 27513, 86842, -43421, 0, -107354, -107354], [-64660341, 4097450, 25979, 128976900, 0, 938366, -938366, -5125, -45870, 347351, 306606, 40745, 41158, 15179, 0, 19697, 45676, -343782, 0, 25979], [55632826, 5770524, 5708160, 55741622, -151744, -2099366, -995285, 134336, -420416, -295028, 438312, 0, -64260, 32130, -108796, 124728, -62364, 0, -45663, -45663], [-5831994, -10139552, -10131310, -5732154, 77104, -63198, 18321, -81318, 239740, -143188, 363480, 0, -125448, 62724, -99840, -16484, 8242, 0, -70025, -70025], [59276, -13019190, -6585456, -211487342, -37678, 408451, 0, 0, -590796, 0, -273348, 37678, 213766, 37560, 59276, 55004, -37560, 59276, -37560, -75120]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_76_h_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_76_7_h_a();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_76_7_h_a(:prec:=20)
    chi := MakeCharacter_76_h();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 7));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 1;
    while true do
        trunc_vec := Vector(Kf, [0] cat [f_vec[i]: i in [1..prec]]);
        B := Basis(S, prec + 1);
        S_basismat := Matrix([AbsEltseq(g): g in B]);
        if Rank(S_basismat) eq Min(NumberOfRows(S_basismat), NumberOfColumns(S_basismat)) then
            S_basismat := ChangeRing(S_basismat,Kf);
            f_lincom := Solution(S_basismat,trunc_vec);
            f := &+[f_lincom[i]*Basis(S)[i] : i in [1..#Basis(S)]];
            return f;
        end if;
        error if prec eq maxprec, "Unable to distinguish newform within newspace";
        prec := Min(Ceiling(1.25 * prec), maxprec);
    end while;
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_76_7_h_a();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function MakeNewformModSym_76_7_h_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_76_h();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,7,sign)));
    Vf := Kernel([],Snew);
    return Vf;
end function;