
// Make newform 76.6.e.a in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_76_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_76_e_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_6_e_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_6_e_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 := [804303742853852430336, -185653809995679793152, 53672321824823513088, -4977732006498379776, 977121800205220864, -57314532742553600, 12736924096193536, -375077568148992, 79755165392064, -863969476320, 361098181456, -1275481376, 897054160, -1027368, 1608492, -768, 1540, -2, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [71878436663628318624774258674633632936444025264967807588435013780709515493207322276397056, -21129164477042334522662550391823534238163570778131126869966486250934573630289471319486464, 1161019296294903776776678819406005116228428274533759631796100801012106148476266054055936, -406089178477091752802466833853349116778655633099619931413984005697963286920202750481408, 25555937995975535777123223310133036139501406534413211812992158644667290238320693354496, -5839908925905581451823430258222450174010197230345208353755714592568471515463454817280, 184797659852486764417576029751468112444012764751901717526390473985306296030196351488, -36478570468812374336882110826264642584158497531179398187549590895353568792888021056, 555524560810017754193037434602843897865366048175718336702702951273403308303886496, -167157108358680413371764332884355154409635040608760655298613686829367094551456624, 1052699588472083773725677446422418012755076304197659937524387555100962986882656, -416708246028232573287668083859950645202570404564557473734471101316126370226416, 1501211670473942502577509189488957190854161625351015079282694235880292213368, -752771898165902881245385775937379319054414172394345759922295989348461798308, 1393860169174319959723930407314234280290615659701036760468703582012973312, -724340135611793435389866629006935125086744222684401283986534210878883628, 1729855721767165733830408251317159661247135204033617010824098764623142, -472626595639080906308374410377619523313611515275438959416780831965339], [-10294124619978391706031360640218832034562388748053335343189863331074646737014489088, 429667078773971676392819156183815684264934686865448951353994778348566657102249984, -114760350010733085288298046775613232185164744007421402934521854780828035721322496, 32268423387314831624365606919767960876873054126767177022718141675280268686601216, -1509030134978116282129364206858948737746988904413003439793083020294275536603136, 41498566451839980905806640205624469690915299557867232646813948630818116313088, -4871724237773388368954228744929564010824101583669921366736453511480359670528, -203805956747446519580717809408645737042842765678371349864995119649482950400, -32925187575328259885785853317043525915248543952530911270939143945875582080, -3985917681544738472943462775356536934839755776936081145399132353402531152, -94983537277567979302581568859896955161100739289931150567590824761801120, -12182635941633197216878719815666000266104975717892196348128841917509824, -196694220088309807523707697189039617487417200719275792019394315643328, -27503967518256662639990523793279045646163499754044960491800424933852, -201590100956818954213737291275322200771401042663909765557350914560, -27916471790370605585940363324288086680380112678623412713847013120, -94911120552819746379977792500327692000952540177602324953548604, -21247159575592305888722529091722890884188572712245037398523533], [28477780749379532506493904194613391114076056877089508978700522127209490972471475314188050390656745472, -10185399393058148987592216304061531397243557315167645836125704106923382356380541223131180694868750336, 1203847288578513458044605333386493223416789387223774945729805409617847905045919844616713261337548800, 5321789046272854612956444361459431041859441163255837306869611888492764588472139027014054085368832, 30910559351819905772981547045487976193668979000659366628362646026089875028948402976069879552573440, 644892906856511475223665753891313873207113768404902764423939215306521722679444571691002535953408, 273230704610779413408509626428668880097572040704509408467207739367658470256075418836346393012736, 11336523916819398778178357590244808898045159484973120218590105635515042469856097708190632793792, 1544025504699161171621955660510470968409766342873196506845412733561112468595794989866809671200, 51132262455059877181014195571098652339858266660842221015442748257577376783404936809282072016, 4151119309526298860877148839549247439298475173829784985201791276059010509523344038784476640, 128462831794692021287285163082314615169938695314177880417853501411516574877848937808421712, 7830580230275794107589877475589482246521945472422832988223389333827350046533946334485144, 202777315411777418376595344230448445778610972266125480018384188508259764418222526460044, 7575336875251502761010440926333203541951413843582892267900379624342805616131935900416, 176991283902065371353759994024972719094110575051639134926280728017250951593142259812, 4877657827072671331982425220888025864511042471746957173249232732180310421611313710, 102414336615065846894159309489122390862101713854494111091888038936707952943006729], [19325303156995466909679156336889255075078574129446872044415427253858572995183568749105926042957119488, -7579943527198212921867867278706024542597718528147261957546818446507333978951358410131478856582393856, 1136519806126749003014471820676800730771303417399602454072515235597021530862135345743923666980423680, -80791523523479364987091265494982456715430188057283253275465579320541300922689255009634416890872832, 29689212815024883700851008014291726383618920502714256977953819494125674804485043870759611083696128, -739766707953043970088962568899736316877163119053405129362806097399186569390412525753714077984768, 241534383189540882263916323384847615248648999932626279644976970083065917705817893388799895755264, 758182620885757052696545892005256003936329599963659243067804184157977298793872983384477190592, 1262953741885528669941598961722783489440376617471502745047551415843253319328889354850844827360, 3070752639724069271839121192717239667691614001359634213344426527547396013107419685972403024, 3277641981759518419295959507352386506300916402186502518030277682662767561004135159213730272, 8315489791354756155694353851729062391793347516009513014585463236102588605230046958751248, 6129751299442196195324646698545860361176261393574553668017578268153183660496648855064616, -6697756638683234833859273974038657318511979970788490060345621202694700872791377842292, 5916953027472152063795505976977189057752392423169444744388022237783576660914044039424, -20414996917746797050724737639368202230799997314817930438254186783127588140912359612, 4041224282208527571829463225734012711332301843245928871146025922517148948969528858, -23263255057952213234149075869486785808138011172478270994255961709886404036474679], [5775888998680513716083747711881956323314395062257851008868271693263099758180847758665279219118899200, -360066749127537266996867109414886304201516596038783423653881404999505893119103790236059755050872832, 132112179001126103652084795809747913654927002547132866292626923140238144178495161844277847732180992, 30675279040046949406362378558594122504296635030954375248630344038221529369318196347924881568525312, 4044653952426094091776348957610990821402551875005216921058737408902593685645806635735660014186496, 543732718700370264282156917223784199267817087474226908285357194584575776138937709484363744242688, 35732635161718935986742020340500327508753417358519225041502205688390072059879494464024777957888, 4708683193761171971139216518969091630586774394543962589154190263447530359138505358816073143744, 237643755950480467307785049194400856638970434801266271662983196190349463209213065034844581408, 21482544930112286687311379712149670268227655587353341485794438278573181753935267128146968464, 668434271138856578278960245958648863448861254274821121267226189560744837446656550425173600, 53820679523033920101901952061964513295553455080391892880718255674106956859132879106870416, 1302310773214534602712458505288846440822713351540651644678189189925036500067939608557720, 92325077798178412929397731353987808378406363111921779073563522441693718667481808417884, 1265030229264381279805462923957878773706410663497829563716358446291478189072567271680, 85727547691282454389631674761055629515012064031686219634262026170658874749108285332, 756189309831730494234830192143203618319425057679738273104425184371871443588983870, 53839223503491833034862001180002734006831717365062469955237601414586130501427301], [-15392850568469740843538707441752207252231901771547462533074685561676975844893817485477391630336, -223912360412923642233299502965534802126467861862212988337865332498264786548760707078233653248, 57855467878138689232091341999677743818197934914379603158197966373559263070001074234293553152, 1534967112492756673074939916959744834208995349042731029185285194620366633332615812027374592, 877231297917021052908085169223712604669531277470980637656597043461013121283203146805214208, -67562181751879848463471862054806316322752535421878802919644179040297281502773728214643712, 10418942202162636704952010213966062560576481260121803346225234201978540811208633398010112, -565163183244260329099263106347487506738599249076216031989718997352122562814350036150912, 28043477731138278874597968989569826629674699079555825830151578747148731509824902978144, -4250037322729955381623520137396615944303664877348895566668005453675330994265692353552, 52569386160337316737461236217087347718965297976063177957623282002788971950770437216, -11961445571456773517134983513667174629133792638984862284100435385458606415242280480, 46813836170632994028689939685977374929859791709931295507905723593438287627259368, -25073441761972527382894002396319630158103296795498061206508185007756255218954300, 28574760595247782494644826690972531333849599238491188434976343091766719101952, -25168712109157634933346095759012321215880046555045428849373204906566807339712, 33207601901925883638133111282508891420673409109788062743054176632580801346, -18195924496022925499166252107627773876985814674075209890156086752588650765], [-2876845461012841955363197963019583225038330990336989491544924759816123930542500921494388539392, 571025402489598004684075705050304314322296685341483468421756871500557065968703859387313029120, -149401370078763227675543618685937891263296026629816682817345232550483127295238931190594127872, 4447086746148561653953415532575655286654658920382002758082302564634851268093281056005567488, -2167830150969164687331478673737113205146712094326575246806145190308495318713315512286772224, 133071196105594666233895561780443675649512445985208427201107075549122399469160187253920768, -17920278816486794732196236481395217423752373687161274909874547565137980517950465081183488, 864210957772136602679187232822035772774465371967743611687731441977986770888494608396928, -64100060177455533423414377759172364947376308935384446073182852925003533507488974512992, 5369253305779638682174210569530912169711929185443292181528772407448555719983428723024, -142051839164307057588859563144290809813299524882254643967707606774613173782677117920, 14562147728822381538258214130353708700775811492100121752238786393473119643733095456, -214210792451960410910345195262638736057727684251994059765980719264172773196589864, 29593711023101863095177236376639848275363502198084156247976650876297363025601580, -191229397124407544280734185595590758176933965258132626257721959417111670127488, 29664667646469322368231750333597811212623210279546225282229679397470739606208, -149139024200297963251034788118919960876223060814233334161305818942539614722, 20944692764351551217170331861901335507873607879894525051687819873254317793], [13542572401442870413110332359747213740552231961175067338611981943515294854547785317859163936674545664, -1197743766261393774019965507159954321563449655989510013060586832360151617646129250811331835264921600, -1145192726459884786856874364914520730127896132969809088268747735359279199392048149346649513906776064, 73680389859142432109995382064681829465510806940228969694999476097249841110539316628003745741126656, -3260027066270289139752879782081499382548235489072082240317153958468159260377783270892477775159296, 2780366753849306404475099585582706013279560504696587976144371137712868157203425314329705859228672, -22138850060815346047615084801812957328406087573530643248869102945839868736433166149329740332544, 25552122577975862910688705910143696497491994692610981872771998715249561557833356880424452371136, 532465397000578907740934956637783414084343518375193442471854604325672739173904010973275920672, 141390537269118791217365069398253535808219424287296248079064457470178478650812316489521077840, 1952422420340716498939034253128820351273749722488801183328518726999241304292608766100929248, 375156609813352105769817319778719875501705451112923601304551993611466236570128019728952912, 4689099474872471064374793963469426048300424243585856393421260743497825863780826112854488, 706361092955342793317333347125122139643509196001726001466305677772270250346701516160364, 4833066563902358147720507572974253073622401450587282227150346504499456032557107688192, 682109068094353451650639047440423887959334966531784069571811303025615101933671475812, 2734816278843997176319449374004229129843012116468900441834884473684797539383494398, 459943925982177715586968401185616791761030320673543084250887601934137315552720689], [5750927643418036802414201876814263726138307000612277854753007511889719823770832533366722299474345984, -1625189228097627868875908213767785695155954369269494637853730120565807645974016003843107028083927040, 77558929084086164988168551754725628146803591819289551899530306154003304806771822054670074024078336, -28883117346385757334957650743171250582101335667635471575698523361186583191834097958126397492919296, 1833580922384165559537055697977313625813202411896757663960263530036716060663006628105208151376896, -372105999621789150927510548083759274548652190098012019884969401816049536660754589961627842808576, 13151138655311733808436172617466339291405895818288546832194468073888902587808333897309009720960, -2143391156166133033521896267046396741839743005023560123855199734040597825570138736036074180832, 52043841796093142769614204316401318990782759013488686174756654341836345829122376191215855024, -9263694974376526315343901705044251253694443172064268984276370868385119687611743211828540192, 118263351727253591407633016209293399894831083301815919453090142599715866520027094867547424, -22587058814018164013327344143982887440666055488699151115824513575526267516139589755854856, 208367385652117577799138732043829623687210739024437487817811891984030543858470370328436, -40100817693241676900901737211096891883384566307926746053323219189524962838616242513280, 203568330638797530149454611453099872871841528403761747198758483009845885713325815744, -38504586541565937039916657485975793286572795965296431568966852164504408729107668994, 183425260409399583133297355530906072764354445692873593590707733731450890753119015, -24747415680063312017511205034975215862878206037390204150679412653936318288823904], [-9668776945635053005361392318530935449459355659144887249370808809636940656004509557348365443921216536576, 469097434017635152996668907241446699242145209546755627383315478871444846914754706915062497246044237824, -274572513829225530523032440732962766162170049774032588800448102379418790518431858921774698403448035328, -3951823646531560829470743338091711627658139114427560605311209907122381488436821050456813383135284224, -4739964060178977243427426971965032196227544547516660461658443118434734031152144733058029200090345472, -47402707021507075497772643435966763001267752610152460983219787434540741276474024389763364338609152, -34672448122451869728804460634759301574209383258319690280238838190026045240069057034450281306763776, -766281293290460066469749829447922847768196192296743655129056373793373665314316412504518544417728, -169678721690127746480532097613513516537411905275964822323945874857747484767892088187412633802016, -2868610714696582886278331713116113482396557866910900308464048906917400914225929487339913237008, -433172031106822728134064539620553041665493864237808850326149190169892239957652556748376259936, -6623041110281125677212358431010674750931811643710208693689756580816607534992306456356039952, -787642845130655928329945416515293575384184742223455110015210579302521299107770951380200920, -8632202264353244435305398045773972460782735941287680927662494667453695331416242894004924, -752580581007175072004049279234496932465731713557783635974989070255412806828077138879744, -6331316236572294661793657551735925218723202245065682225397695163786372390872338769332, -489705975802739302172246657349857887733041462333322915002925238630810404118071641358, -2837262766552336403741024536316006104250749584099684102092616532683401608080542765], [-11380382562158486092025330701143178964329406685191934113212856314117691716375524399365818810368, 5320240743165913924508408041748148415830991798730984846266511266957339681582689123324853616640, -1395377054599004249577489270890912385179010126190599731694568185809688274679951282787179169792, 82082858286903920842077796536381031946676182228854044616239793520459020985617693887813534720, -20044225846246325293675413975640780670164330920022312459046407187741487154105461744907860992, 1160961100806311548396015145086872090501916808282080449424707493119965155865562218476860416, -155579931390863483572200591471654298377217800335031668692507110160061198619807322055524608, 6898105510856235032539885198114503088471997648937207579142612840540507859625278766178944, -579100775403418230262911363916586820550262242741501947171012542778181939833750686074464, 38904727608967718380904679311173001560797961469120372264367103005769871184944068362384, -1321435324172429752128073787274862604376249844588266659779430202959011524621676574048, 104148071220000342940079509616342113990194100057434709575697949297479827914847602720, -2096231023433811502352599492840824300027252156377785406930829863732610011184820200, 207860475879867524135611067403985059869428915969022337281239907983413837374877852, -1929034997114934807521427986428798992547402054744607217886764378043299211169664, 208612651023415429985077825936982964183739408691051364003035517015777600448704, -1432734192854145115968255602926754181721356533587397514689232695663640636386, 144753066818181812621001381491687262685328440949035379486792305479952770581], [-36726833766561648098314741542724272583801640320416348254729861912804265730308286985828736761856, 4776699101665564603332119683501280177154932633538511423308322895525187988019033498534199558144, -1255232828699548076715599322208993634729382899268701747153489517325351557343136564118687922176, 59106512199233459372362330039237468573800695797042166647214764106123152934772763942222191616, -17900596201180685838060033553124734648413341466705178365627999494915662818620433987323569152, 989852755788238838751327970558249066105951996648939621912156340790837917302299807223327744, -127460990582499490309096519451644178436799383858703002493199377927497802642040120544759552, 5422433561784462011594109847386233582378180125811606029734052078541299209478149308879232, -509313719177236434868370246518013505609553947927755484790465055462927859193772585222304, 27976657358526820907278904807380792841561701851382260411847250928086336214074752158448, -1193185288418086305956329349613061335213852577930431055788461432087709885443811773856, 72285499893665397730577895897456350580248599659770947283472606632623997712848276704, -1998977215578716347248827540420580155966656304011328416096824863305050905889390168, 140912906108861106478387039293067396913143154031191551365215963489592014560446852, -1870674365338547613095201170932747100471681394212330686202814989878467270675712, 140592261581754197740941579700612142047261579263807544881940524826223174082880, -1353853300257318204569661592357332479818111477736098239892184505110194672302, 96064497114575946499991922366908679043753422663512086227548705787980590723], [653265242908469070722577105491085222265942880756275118290211290329226906624515437314833725915136, -76088430344285767773850708836076145130492766633241663789773416439005696993286113051331328606208, 19927702741457276762087898578128828508168808417875204073593207751891435222766839208117384673280, -342678515201534177222943369116662437336864134739946499351289941561030451993984595023217462272, 289214254044280327742173382101455863151915836898072912099474542863098819399997361924234552320, -17596862518717907684140247158848550060165202768124694937615706369739565608091587712278236160, 2254634166614919696175737641061502171553673988811509551172668013921685597264785437774643968, -112904179931502396253544400582301311652826216671196889450398515869189697064382293254490496, 8650252671146128861511611233551728401900695049833380237450948116326774781891747422410656, -690217342094094284179284837202317357744108843773896701850405154149796159792176956260784, 19715216379121614278408699307564098488488824831275931041894202478016858867972678684192, -1863725238733924145856300927137813727314318331572686572189022093309458401465463224032, 32175841403489696917769542833163942499193454829741937254909268823852903598481422616, -3775418758481541999573201615746625539784777282614012727969148070158859491845626004, 29684896284205604222456234437860652440758331296266877982113236097495733761997696, -3794867303142762210826218017643982173018874945708181356349571412464463161519168, 23714140049706432328516343957604824435562491103855816961735154136218844033262, -2670134461650144748020247327131887708945750180334707855322944727558139795183], [-40804689827455517676807728072650626901471436920519099830479916835146139870087094477028189814162194432, -8341408995339638410361948514277527945724628401461665059134436823737443693898896282673549600647622656, -542163387891568766854463489581021835558784816868506001228841224995167610018260280390954649048934400, -320144295933735970647077159509995859665266945642525037234639688256931928742870818172168415116784640, -25145132182457416621832754719719300956549203393037448712238094381131930214979670268028544960450560, -5289895366941947785520992853769661434919911641850566519384358827631957512276838848679505960604672, -183189440657105624339503520258002038421353060397289675851314445251938155452919712727747083398656, -40434473850820365914128888347602640866388040701114924093157256091467119519127758587476445231168, -1410196859605724404475645479650501829624225465137393184526227456769595250772437360782674557152, -192058085852932611754767462699533381116941704289079682206031823376970218050243277014223584496, -4086022546622451749045482583904483347323010316220852028571619164014311775668804584887864480, -484951292233222675809953161927642555469240370465624374450390461714055616425901039338136560, -8213490470264748507336720446512865193871464434126149183465744401749328730438247054543016, -865137893148024287052832807811065571501030848879502467375019548364967828708210376304004, -8041951522350443878356599499121008057873242769419121849944049240496114915759545033984, -817513248706153477486514675573508272443397284996135468791544917234876199816815150220, -4529082011005303215900646517199892909093007365354408269702467149931815209307009298, -532606466832988652687474219277291816283608677476103490266716978624391938937366531], [597072220089614097824344851813797631508094110389761579437944328280956290561154783566340350023835058176, -209255676556280148077778575320498256448538801521396642274828612179103130937637223505561577391779590144, 31279066249016144414168763912445309331231513898933982359745718076392618091150873016981913400219015168, -5322798400791303643371152758147744873041408687449763217092735430967221385516600819256519155801754624, 344050119065519574727799373572780854178761697519335700599039230123968318004564187728457291518717952, -102159599971376276399605388132527246955040948977660398494126768223140673636843388966720240480616448, 2692472922545326184216015573360394838704949545053574241810598777065219781132091240708949885962240, -718178172595054109144674325400956077472841841782579231695248665099531076101191227700179775630400, 3224632075926803312439825753534172641810250752391053397311332478011182444988801752554172845216, -3566010164004044802313084750646441537559365114517505247917553897038298460079370668278526424400, -1308463984536411512877997146151299634247748014402387502109977371446516274758038011194215776, -9132962249782358293194556246469242578243116569430868103606821579707466672655409377192849648, -17107764444474997126059321288987855904385809945676612369110442625859911248559130855349448, -16875944500457151817198564987357683029147321609869001375422585476686612123744658447461580, -19577744700485267954316542128371055588385825674617551668288939247461679815167501861888, -16306725855445832585064645831856935420667976593795501737543898295484007083704812139916, 3270085873456039195037046689186238799562022825755094489477225288902127239608422958, -10835003063790048586643511455400047124775438621797716259349158117315465149648754937], [5758220157276758782419171382432375058444864922871854208260862620154209812077550900949456375985430986752, -1063714633129926458883329905975909851207997747372774218242548510594934709727907581777591585440434245632, 203863984118959096069907719822955024610333317377605335029039577521792183533968785807871368694108694528, -17964529480651131300391840329040040257078697845106239337171066699994716140201346356762229846559347712, 2506695487911555261254076315701114707172557769867484474042191984582784267782772983920662332267057152, -297135338164167989386432134486545757352762750253008203115343638511954891795276158252316019502657536, 17889901609030684190023465368042151136150378373747397711015574788099523199817998536647376195973120, -1919402149730235899156404217309145075099332321047859746394178823125305741251775436410237283220416, 54850948682717057675110215921845168584962227783387692760389144050892819897612182829182517624416, -9596723870346584941778518846451013107636705201872841311775598647542221030101552331312744781872, 109251523580841802310369811069173956403790895298378193648799178808872360295815528855501690464, -24627523972092504114741962750717609617512888447504020157993595515577964007013029680570001168, 149267867286114718824355817203307506753252140017654617639998473547938885472087606227689992, -46200923838578880976687179118428876355097803782119179048410775637098503818104674821868756, 130881576480817918984356705706763542885175981591352473051092879990163357272338210280704, -45045532180138093187488128114033102311352722031618626140544936204390336996249227392180, 127095895070873473759385364356412305187187427288466040166850259669436492288429889826, -30195375991339180453900829769029828524016663906395712419576906925649015569360200191]];
    Rf_basisdens := [1, 1, 80640691910722518150645804294812037386148761663590694585742487591805006876183567321530368, 2183762583897643672977150313252748131852329350156141329652557460621254729716842496, 715605168703468910865365045383875074529428510010516528891510129366667360088382225611074145124483072, 79511685411496545651707227264875008281047612223390725432390014374074151120931358401230460569387008, 159023370822993091303414454529750016562095224446781450864780028748148302241862716802460921138774016, 51676533860050970694747203875154199795044989167974568114213712074721833357552542047617613824, 51676533860050970694747203875154199795044989167974568114213712074721833357552542047617613824, 715605168703468910865365045383875074529428510010516528891510129366667360088382225611074145124483072, 19877921352874136412926806816218752070261903055847681358097503593518537780232839600307615142346752, 1431210337406937821730730090767750149058857020021033057783020258733334720176764451222148290248966144, 51676533860050970694747203875154199795044989167974568114213712074721833357552542047617613824, 17225511286683656898249067958384733265014996389324856038071237358240611119184180682539204608, 465088804740458736252724834876387798155404902511771113027923408672496500217972878428558524416, 53007790274331030434471484843250005520698408148927150288260009582716100747287572267486973712924672, 715605168703468910865365045383875074529428510010516528891510129366667360088382225611074145124483072, 715605168703468910865365045383875074529428510010516528891510129366667360088382225611074145124483072];
    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_e();"
function MakeCharacter_76_e()
    N := 76;
    order := 3;
    char_gens := [39, 21];
    v := [3, 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_e_Hecke();"
function MakeCharacter_76_e_Hecke(Kf)
    N := 76;
    order := 3;
    char_gens := [39, 21];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 1, 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 := 6;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 0, 0, -2, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0], [-18, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0], [23, 5, -23, 0, 0, 0, -3, 1, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0], [-1, -15, 17, -16, 0, 0, 1, 0, 1, 0, 1, -1, 0, -1, 1, 1, -1, -2], [-172, 13, 247, 6, 1, -1, -2, 1, -3, 2, 0, -1, 0, 2, 1, -1, -2, 0], [-378, -17, 377, -1, 6, 1, 0, -2, 0, 0, -2, -2, 0, 0, 3, -1, -4, -1], [-832, 60, 833, 1, 6, -2, -12, -7, 0, 0, -7, 2, 0, 0, 3, 3, -2, 1], [-560, -1, -1, -19, 11, 0, 0, -7, 13, -11, 0, -1, 2, -9, -6, 0, 0, 1], [1454, 0, 0, -81, 20, 0, 0, 9, -42, -20, 0, 0, -4, -8, 3, 0, 0, 0], [0, -47, -830, -47, 0, 0, 55, 0, 55, 0, 15, 0, 0, 16, 0, -16, 0, 0], [1, 148, -882, 149, 0, 5, -16, 0, -16, 29, -6, 1, 5, 11, -1, -11, 6, 2], [4173, -53, -4173, 0, 30, -1, -19, 21, 0, 0, 21, 0, 0, 0, -12, 32, 12, 0], [-2212, -323, 2213, 1, -66, 10, -228, -22, 0, 0, -22, 2, 0, 0, -6, -13, 7, 1], [11, 167, -8230, 178, 0, 17, 102, 0, 102, 129, 28, 11, 17, 10, -11, -10, 14, 22], [-849, -32, 859, 10, 120, -4, -19, -30, 0, 0, -30, 20, 0, 0, -14, -2, 24, 10], [-3029, 532, 3019, -10, 29, 19, -103, -71, 0, 0, -71, -20, 0, 0, -24, 27, 14, -10], [11, 1382, -5644, 1393, 0, 1, -172, 0, -172, -201, 10, 11, 1, 13, -11, -13, 44, 22], [1, 1134, -1431, 1135, 0, -6, 700, 0, 700, 154, 2, 1, -6, 17, -1, -17, -26, 2], [1, -1476, 3094, -1475, 0, 3, 540, 0, 540, 21, 10, 1, 3, -57, -1, 57, 8, 2], [4516, -11, -11, -291, -117, 0, 0, 134, -68, 117, 0, -11, 15, 41, 52, 0, 0, 11], [-17077, -894, 17066, -11, -24, -16, -347, -151, 0, 0, -151, -22, 0, 0, -12, -81, 1, -11], [-45, -1061, 12028, -1106, 0, -50, 721, 0, 721, 134, 1, -45, -50, -5, 45, 5, -64, -90], [-4018, -4172, 4019, 1, 114, -38, 906, 29, 0, 0, 29, 2, 0, 0, 57, 59, -56, 1], [-21608, 34, 34, 1904, 88, 0, 0, -298, -118, -88, 0, 34, 40, 36, 40, 0, 0, -34], [8804, -34, -34, -2830, -54, 0, 0, 82, 1370, 54, 0, -34, 36, 78, 20, 0, 0, 34], [-44, 5945, 5719, 5901, 0, -8, 245, 0, 245, 64, -251, -44, -8, -60, 44, 60, -61, -88], [18420, 0, 0, -1877, 150, 0, 0, -135, -949, -150, 0, 0, -70, -8, 75, 0, 0, 0], [7202, -237, -7157, 45, 101, 35, -344, -122, 0, 0, -122, 90, 0, 0, 61, 87, -16, 45], [20, -4019, -23421, -3999, 0, 104, 112, 0, 112, -78, -272, 20, 104, 252, -20, -252, 248, 40], [-23332, -6396, 23353, 21, -630, 114, -197, 453, 0, 0, 453, 42, 0, 0, 63, 171, -42, 21], [77192, -9864, -77203, -11, 1001, -11, 120, 506, 0, 0, 506, -22, 0, 0, -117, 34, 106, -11], [45, 4541, -80912, 4586, 0, 90, -26, 0, -26, -18, -9, 45, 90, 65, -45, -65, 378, 90], [37894, 0, 0, -2296, -1455, 0, 0, -480, -504, 1455, 0, 0, -80, -22, -120, 0, 0, 0], [-21, 5818, 56136, 5797, 0, -54, -730, 0, -730, -1486, 100, -21, -54, 559, 21, -559, 107, -42], [-85602, 66, 66, -12325, -654, 0, 0, 206, -74, 654, 0, 66, -40, -141, 68, 0, 0, -66], [-54123, -3343, 54113, -10, -399, -41, 3843, 415, 0, 0, 415, -20, 0, 0, -186, 142, 176, -10], [75, 448, -147900, 523, 0, 70, -1844, 0, -1844, -462, 1098, 75, 70, -737, -75, 737, 225, 150], [72386, -130, -130, 7604, 339, 0, 0, 43, 1021, -339, 0, -130, 59, 468, -82, 0, 0, 130], [-99207, 15370, 99121, -86, 652, 108, 3389, -248, 0, 0, -248, -172, 0, 0, 230, 86, -316, -86], [-67232, 76, 76, 8854, 306, 0, 0, -790, -3254, -306, 0, 76, 198, 66, 40, 0, 0, -76], [-66, -9244, 181052, -9310, 0, -106, -1568, 0, -1568, -986, 990, -66, -106, 390, 66, -390, -237, -132], [-109752, -120, -120, 4501, -372, 0, 0, -753, -2140, 372, 0, -120, 356, 40, -9, 0, 0, 120], [143747, -2849, -143703, 44, 1941, 63, 1581, -339, 0, 0, -339, 88, 0, 0, 500, -570, -456, 44], [-342, -9302, -6165, -9644, 0, -178, -3508, 0, -3508, 484, 984, -342, -178, -187, 342, 187, -732, -684], [-408, 8493, -403737, 8085, 0, -205, 97, 0, 97, 726, 1125, -408, -205, 174, 408, -174, -480, -816], [335934, 12, 12, -6390, -129, 0, 0, -1425, 3821, 129, 0, 12, -271, -366, 42, 0, 0, -12], [-99606, -353, -353, 17901, 198, 0, 0, -751, -1115, -198, 0, -353, -174, -691, -116, 0, 0, 353], [244, -13963, 137064, -13719, 0, 496, -5005, 0, -5005, -2856, 491, 244, 496, -204, -244, 204, -110, 488], [-372102, -309, -309, 1489, 534, 0, 0, 2085, 1417, -534, 0, -309, 394, 553, -582, 0, 0, 309], [124482, 2541, -124130, 352, 1156, -60, 5941, -909, 0, 0, -909, 704, 0, 0, -446, -116, 798, 352], [-619928, 16383, 619793, -135, 1944, 432, -361, -27, 0, 0, -27, -270, 0, 0, -135, 447, 0, -135], [-190601, -5051, 190626, 25, 858, 362, 11330, 440, 0, 0, 440, 50, 0, 0, -813, -409, 838, 25], [308, 1033, -347337, 1341, 0, 353, -2369, 0, -2369, 2640, -749, 308, 353, 954, -308, -954, 824, 616], [320, 7803, 521821, 8123, 0, 728, 8039, 0, 8039, 300, -485, 320, 728, -1336, -320, 1336, 1439, 640], [90, 4609, 362449, 4699, 0, 223, 12355, 0, 12355, 5648, -1973, 90, 223, 1486, -90, -1486, 536, 180], [-877132, 218, 218, 17275, 548, 0, 0, -211, 1988, -548, 0, 218, 164, 974, 471, 0, 0, -218], [-686771, 3101, 686982, 211, -5718, -278, -7688, 182, 0, 0, 182, 422, 0, 0, -1455, 385, 1666, 211], [502, 18999, -479299, 19501, 0, 492, -3226, 0, -3226, -956, -1334, 502, 492, 106, -502, -106, -256, 1004], [421044, -394, -394, -26687, 348, 0, 0, -185, -2956, -348, 0, -394, 524, 2402, 401, 0, 0, 394], [-263, 41107, 1227288, 40844, 0, -115, -5008, 0, -5008, 7, 298, -263, -115, 1298, 263, -1298, -670, -526], [262300, -593, -593, -8237, 2907, 0, 0, 323, 4615, -2907, 0, -593, 804, 1365, -2582, 0, 0, 593], [544632, 5115, -544258, 374, -2964, 564, 2319, -5117, 0, 0, -5117, 748, 0, 0, -1086, -2694, 1460, 374], [-18297, -10937, 18023, -274, -540, 180, -11143, -1283, 0, 0, -1283, -548, 0, 0, 2403, 482, -2677, -274], [551922, -392, -392, -10318, 987, 0, 0, -1847, -1869, -987, 0, -392, -401, -3670, 174, 0, 0, 392], [-343, -85149, -860734, -85492, 0, -530, 5561, 0, 5561, -346, -1359, -343, -530, 2997, 343, -2997, -2406, -686], [-327, 8545, 439336, 8218, 0, -1167, -308, 0, -308, 135, 5382, -327, -1167, -452, 327, 452, -1650, -654], [301830, 299, 299, 849, 998, 0, 0, 2869, -14895, -998, 0, 299, 1378, -2311, 1784, 0, 0, -299], [-1682904, 174, 174, 51243, 6066, 0, 0, -651, 6093, -6066, 0, 174, -234, -2790, -1059, 0, 0, -174], [-302, 21101, -1074747, 20799, 0, -215, -11383, 0, -11383, -6834, -1195, -302, -215, -1314, 302, 1314, 1036, -604], [18765, 23063, -19281, -516, 3652, 845, 32839, -4473, 0, 0, -4473, -1032, 0, 0, 828, -2256, -1344, -516], [380478, -466, -466, 27852, 3936, 0, 0, -3176, 9780, -3936, 0, -466, -832, -5558, 926, 0, 0, 466], [1708496, -484, -484, -19585, -8969, 0, 0, -1169, -28419, 8969, 0, -484, 673, 2183, 1118, 0, 0, 484], [-109, 98814, 1656066, 98705, 0, -187, -6524, 0, -6524, 8994, 4330, -109, -187, -433, 109, 433, 200, -218], [1335184, 13129, -1335657, -473, -6042, -686, -13034, -1288, 0, 0, -1288, -946, 0, 0, 1218, 4709, -1691, -473], [-952, -24714, -1069173, -25666, 0, 168, -8087, 0, -8087, 5328, 250, -952, 168, 464, 952, -464, -2308, -1904], [-741, 86109, 51056, 85368, 0, 450, 2633, 0, 2633, -4014, 627, -741, 450, 4599, 741, -4599, -3270, -1482], [-1429773, -13141, 1431308, 1535, 1822, 374, -4468, -6336, 0, 0, -6336, 3070, 0, 0, -2083, 4561, 3618, 1535], [-1728, -894, -894, -69734, -10284, 0, 0, -4974, -26582, 10284, 0, -894, -632, 2818, -2580, 0, 0, 894], [-98, 31204, 1779671, 31106, 0, 1216, 37065, 0, 37065, -2628, 6296, -98, 1216, -394, 98, 394, -494, -196], [1469596, 66445, -1469065, 531, -729, 1581, -26020, 3690, 0, 0, 3690, 1062, 0, 0, 459, -3745, 72, 531], [-1775208, 51984, 1776498, 1290, 1542, 1054, -35308, 3612, 0, 0, 3612, 2580, 0, 0, -261, 114, 1551, 1290], [2131, -83702, -639130, -81571, 0, 391, 9618, 0, 9618, -16020, 5516, 2131, 391, 2111, -2131, -2111, 6388, 4262], [286958, -19201, -286055, 903, 23304, -112, 19965, -8553, 0, 0, -8553, 1806, 0, 0, -1065, 2689, 1968, 903], [572337, 1063, 1063, 11535, -29148, 0, 0, -2119, -14411, 29148, 0, 1063, 676, 2009, 745, 0, 0, -1063], [47615, 1494, 1494, 46852, -6210, 0, 0, -3510, 25570, 6210, 0, 1494, 322, -2870, -1797, 0, 0, -1494], [-524, -152297, 1292119, -152821, 0, 12, -23161, 0, -23161, 1764, 3995, -524, 12, -7348, 524, 7348, -2675, -1048], [-809906, -2397, -2397, 54703, -6802, 0, 0, -8991, 10013, 6802, 0, -2397, -394, 2447, -3246, 0, 0, 2397], [-2494326, 1638, 1638, 1275, 9672, 0, 0, 2322, 15218, -9672, 0, 1638, -1312, -2169, -2868, 0, 0, -1638], [-2796883, 186761, 2798681, 1798, -4815, 663, -7585, 9371, 0, 0, 9371, 3596, 0, 0, 2466, 70, -668, 1798], [1646638, 1546, 1546, 107996, 10901, 0, 0, -8820, -18772, -10901, 0, 1546, -750, 2782, 212, 0, 0, -1546], [-1858, 82641, -700361, 80783, 0, -1541, 7393, 0, 7393, 37527, -4631, -1858, -1541, 3488, 1858, -3488, -250, -3716], [-1965, 189376, -791342, 187411, 0, 1300, 15601, 0, 15601, 2450, 17107, -1965, 1300, -3029, 1965, 3029, 152, -3930], [694766, -133267, -693555, 1211, -12894, 203, -3226, -16964, 0, 0, -16964, 2422, 0, 0, 195, -8735, 1016, 1211], [-3114647, 2141, 3111999, -2648, -16548, 140, 24641, 9701, 0, 0, 9701, -5296, 0, 0, 987, 4096, -3635, -2648], [915898, -115, -115, 14318, 25584, 0, 0, -14804, 2100, -25584, 0, -115, -1960, -4161, -391, 0, 0, 115], [-876737, 48771, 874389, -2348, 9747, -225, -15877, 3327, 0, 0, 3327, -4696, 0, 0, -1142, 1790, -1206, -2348], [1919553, -100171, -1921269, -1716, 15144, -3292, 44797, -3311, 0, 0, -3311, -3432, 0, 0, -1757, 5028, 41, -1716], [-2627748, -58595, 2629139, 1391, 15445, -1023, 33946, -3944, 0, 0, -3944, 2782, 0, 0, 7809, -3197, -6418, 1391], [1664620, -6609, -1665223, -603, 12066, -590, -48858, 1248, 0, 0, 1248, -1206, 0, 0, 4008, -9225, -4611, -603], [2512434, -690, -690, 181756, -10653, 0, 0, -4599, -47801, 10653, 0, -690, -4007, -11852, -5274, 0, 0, 690], [3515363, -682, -682, 75911, 10128, 0, 0, -3689, 74631, -10128, 0, -682, 3544, -5682, 2384, 0, 0, 682], [2012798, 1294, 1294, -44056, 8019, 0, 0, 15859, 39565, -8019, 0, 1294, 1059, 536, 6570, 0, 0, -1294], [1272204, -734, -734, 177053, -4878, 0, 0, -949, 37185, 4878, 0, -734, -2242, -1322, -5513, 0, 0, 734], [-1946, 10689, -501373, 8743, 0, -5837, 21325, 0, 21325, -16473, -5851, -1946, -5837, 7228, 1946, -7228, -9410, -3892], [-1575860, -225793, 1573168, -2692, 29028, 236, 22317, 16585, 0, 0, 16585, -5384, 0, 0, -2982, 11560, 290, -2692], [819172, 318791, -815071, 4101, 17412, -551, 29130, 8232, 0, 0, 8232, 8202, 0, 0, -2931, 5821, 7032, 4101], [1279319, -2669, -2669, -255811, 24644, 0, 0, 12255, -5207, -24644, 0, -2669, 268, 9265, 1781, 0, 0, 2669], [2114146, 2982, 2982, -412670, 4929, 0, 0, -9248, -20512, -4929, 0, 2982, 1642, -11316, -5540, 0, 0, -2982], [4484, -27587, 722941, -23103, 0, 2504, 31561, 0, 31561, 18224, -2443, 4484, 2504, 11964, -4484, -11964, 5833, 8968], [3128070, -118340, -3127079, 991, 38982, -1642, -36009, 15923, 0, 0, 15923, 1982, 0, 0, 8421, 5153, -7430, 991], [-4731680, -4964, -4964, -27212, -5902, 0, 0, -6856, -99488, 5902, 0, -4964, 676, 4864, -8816, 0, 0, 4964], [-1746657, 156713, 1745415, -1242, 12264, 3845, -21335, 3697, 0, 0, 3697, -2484, 0, 0, -3602, -6516, 2360, -1242], [655, 244448, -779467, 245103, 0, 2094, -2562, 0, -2562, -30690, -19084, 655, 2094, 4527, -655, -4527, 11140, 1310], [2829, 50498, 1842788, 53327, 0, 5022, -103955, 0, -103955, -15502, -14141, 2829, 5022, -4075, -2829, 4075, -2008, 5658], [2235448, 1666, 1666, 127242, -27762, 0, 0, 944, 11564, 27762, 0, 1666, -3950, 4346, -7328, 0, 0, -1666], [-300202, -2207, -2207, 273295, -3558, 0, 0, -2677, 9151, 3558, 0, -2207, -922, -549, 2764, 0, 0, 2207], [-318141, -14793, 319181, 1040, 11169, 5559, 30791, -35549, 0, 0, -35549, 2080, 0, 0, -10494, 5718, 11534, 1040], [-906472, 241144, 909877, 3405, 30838, -2358, 22940, 2729, 0, 0, 2729, 6810, 0, 0, -12541, 7679, 15946, 3405], [1952367, -2630, -2630, -47203, -5748, 0, 0, 20169, -71373, 5748, 0, -2630, 6012, -786, -6742, 0, 0, 2630], [-2188116, 133, 133, -909, -32478, 0, 0, -12277, 24355, 32478, 0, 133, -566, 5495, -3686, 0, 0, -133], [-325294, -1639, -1639, -417105, 39786, 0, 0, -8609, 24319, -39786, 0, -1639, -1726, 17515, -3454, 0, 0, 1639], [2327276, -2548, -2548, -95328, 3904, 0, 0, 36960, -6296, -3904, 0, -2548, 1204, 13408, 4384, 0, 0, 2548], [2923, -280451, 530922, -277528, 0, -2242, -65694, 0, -65694, -43782, 13811, 2923, -2242, -20953, -2923, 20953, -3104, 5846], [2680823, 97178, -2683119, -2296, 38480, -2360, 20995, 190, 0, 0, 190, -4592, 0, 0, 1044, 2096, -3340, -2296], [2390, -8411, 3954295, -6021, 0, 7903, 146767, 0, 146767, 36861, -17897, 2390, 7903, 2376, -2390, -2376, 848, 4780], [-3598, 29377, 2353903, 25779, 0, -2755, 28117, 0, 28117, -24865, -37711, -3598, -2755, -25896, 3598, 25896, -2012, -7196], [4681480, 5724, 5724, -49389, -26576, 0, 0, 12113, -244220, 26576, 0, 5724, -292, 11868, 737, 0, 0, -5724], [3735, 113607, -1577434, 117342, 0, -3467, -61222, 0, -61222, -19185, 5424, 3735, -3467, 1782, -3735, -1782, 9054, 7470], [-1604, -246077, -453641, -247681, 0, -2103, -56929, 0, -56929, 9882, 8435, -1604, -2103, -208, 1604, 208, 11248, -3208], [9634, -80793, -14405, -4771, -6915, -5897, -185060, -3226, 0, 0, -3226, -9542, 0, 0, 14761, -2497, -19532, -4771], [-6177, -202940, 7308, -209117, 0, -6734, -42148, 0, -42148, -23698, 6366, -6177, -6734, 26427, 6177, -26427, -19119, -12354], [-4197480, -238, -238, 24533, -50922, 0, 0, -3797, 23511, 50922, 0, -238, -582, -7170, 23063, 0, 0, 238], [-4557160, -237676, 4552838, -4322, 34114, -5750, 118544, -7708, 0, 0, -7708, -8644, 0, 0, -2829, -9606, -1493, -4322], [-3791421, -119806, 3791383, -38, -52740, 1488, -87695, -1108, 0, 0, -1108, -76, 0, 0, -2016, 3046, 1978, -38], [-1323450, 3194, 3194, -181064, -49453, 0, 0, 4807, -64055, 49453, 0, 3194, -8137, 10788, 17030, 0, 0, -3194], [-1785510, 4124, 4124, 187923, 50592, 0, 0, -10043, -48914, -50592, 0, 4124, 1516, -9572, 3743, 0, 0, -4124], [9479797, -7951, -7951, 94555, 30132, 0, 0, 30805, -18269, -30132, 0, -7951, 7692, 4511, 1283, 0, 0, 7951], [-693751, 314679, 694309, 558, 9047, 1451, 158425, -10559, 0, 0, -10559, 1116, 0, 0, 12148, -13920, -11590, 558], [7877679, 325385, -7881799, -4120, -23160, -6644, -8283, 5101, 0, 0, 5101, -8240, 0, 0, -2103, 160, -2017, -4120], [-145927, 416289, 147557, 1630, 6159, 2217, 5709, 57389, 0, 0, 57389, 3260, 0, 0, 9366, 26514, -7736, 1630], [4394686, -208973, -4391611, 3075, -8526, -1112, 172065, 10299, 0, 0, 10299, 6150, 0, 0, 5835, 5501, -2760, 3075], [-3305666, 1470, 1470, 450900, -20888, 0, 0, 38424, 229084, 20888, 0, 1470, -5616, 11186, -9738, 0, 0, -1470], [9884, 442601, -5401097, 452485, 0, 3453, 202491, 0, 202491, 33012, 643, 9884, 3453, 4990, -9884, -4990, 16004, 19768], [-4169, -115538, 11445574, -119707, 0, -6118, -33086, 0, -33086, 3754, -3340, -4169, -6118, 39435, 4169, -39435, 1009, -8338], [-3358, 299476, -8152365, 296118, 0, 7916, -112724, 0, -112724, -19932, 29392, -3358, 7916, 5586, 3358, -5586, 8930, -6716], [8878675, 381213, -8880157, -1482, -77390, 3914, -76344, -14460, 0, 0, -14460, -2964, 0, 0, -3594, 3554, 2112, -1482], [-12247476, -2215, -2215, -214665, -12921, 0, 0, -49397, -141605, 12921, 0, -2215, -1034, -5483, 194, 0, 0, 2215], [-579, 36587, -5603364, 36008, 0, -9742, 91920, 0, 91920, 29966, -81171, -579, -9742, 13945, 579, -13945, 180, -1158], [-1308893, -3469, -3469, 74099, -12768, 0, 0, 21061, 95237, 12768, 0, -3469, 6832, -1983, 23519, 0, 0, 3469], [-4900828, 24651, 4907661, 6833, 26818, 8772, 184451, -1511, 0, 0, -1511, 13666, 0, 0, 5913, 28763, 920, 6833], [4920167, 95231, -4915659, 4508, -71661, 7273, -117137, 23503, 0, 0, 23503, 9016, 0, 0, -30120, 22054, 34628, 4508], [-2517, -458807, 7312874, -461324, 0, 2105, 131718, 0, 131718, -19887, 18708, -2517, 2105, -4124, 2517, 4124, 9330, -5034], [-16367602, -3872, -3872, -53634, -23829, 0, 0, 41774, 65478, 23829, 0, -3872, -4466, 2132, 7744, 0, 0, 3872], [-4733772, 8248, 8248, 187640, -18846, 0, 0, 4682, -122430, 18846, 0, 8248, 6170, 9028, 5440, 0, 0, -8248], [1656, -89070, 5683333, -87414, 0, 11856, 51190, 0, 51190, -46800, 25614, 1656, 11856, 984, -1656, -984, 13338, 3312], [-2881179, 696933, 2882722, 1543, -114162, -7466, -102524, -52494, 0, 0, -52494, 3086, 0, 0, -7811, -29143, 9354, 1543], [2146504, -947541, -2145193, 1311, -24114, 2962, 38592, 11130, 0, 0, 11130, 2622, 0, 0, -14136, 37797, 15447, 1311], [369, -594644, 13100690, -594275, 0, 3933, -40732, 0, -40732, -11169, 55110, 369, 3933, 3151, -369, -3151, -20574, 738], [-7057, 14788, -17303447, 7731, 0, 12014, -191110, 0, -191110, -139578, -13844, -7057, 12014, -9561, 7057, 9561, -2392, -14114], [13281, 389632, 4934482, 402913, 0, -6375, 205198, 0, 205198, -37205, -1284, 13281, -6375, -19309, -13281, 19309, -816, 26562], [11819, 484481, 2244466, 496300, 0, -9291, 35322, 0, 35322, 86409, -25232, 11819, -9291, -14300, -11819, 14300, 8210, 23638], [-15484580, -10130, -10130, -364479, 35886, 0, 0, -19573, 114803, -35886, 0, -10130, 4522, -4690, 10135, 0, 0, 10130], [8965, -236338, 12772482, -227373, 0, 6913, -22006, 0, -22006, 43035, -36004, 8965, 6913, 15573, -8965, -15573, 11788, 17930], [-8177, 376874, -2683076, 368697, 0, 8423, 267962, 0, 267962, 11897, -51784, -8177, 8423, 21449, 8177, -21449, -23756, -16354], [-5602373, 17524, 5604421, 2048, -80888, -5532, 19205, 105240, 0, 0, 105240, 4096, 0, 0, 8690, 24368, -6642, 2048]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_76_e_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_76_6_e_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_6_e_a(:prec:=18)
    chi := MakeCharacter_76_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 6));
    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_6_e_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_6_e_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_76_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([],Snew);
    return Vf;
end function;