
// Make newform 252.8.k.e in Magma, downloaded from the LMFDB on 13 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_252_k();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_252_k_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_252_8_k_e();".
// 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_252_8_k_e();".
// 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 := [34494438285389383231614325978300416, 21939035854717669821876654243840, 7200793191683961412674394484736, -1651641278575894088053178880, 967025470523891143640719680, -352418565495722251364640, 77467785793463920028824, -25038421018919762700, 4531523101103784409, -993183560713460, 178819626045814, -17143558340, 5161603375, -207320, 89566, 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], [-1580745060588461087008989485016663114755308575278264252131474944316897710193065223110061321594741143531130886992172435075248335147958272, 2075215034802604370599967528200057715787715126447084593044770982732555014894270172366231135567210378404362593722273884256338387947520, -469792085475995335005460188937197221858524383008750481117406410650997954680238499297345237780129222559540651320336905520035374676480, 529111181365987602860662857591459105081440428811799386317650968139973451038353195561725548239621293845382842283810339376666609600, -34885531766317913445449100913325710113801611813333985037569887284731569795319202662289163830101159437059470147452306299908879840, 44890223879148004175611158715335455220826943062793722001304572045660834942078851487124477958605312503829446227906515312178760, -2302326259117178572950477644997114310545759006921279961353192549863122643381068012882711815518201096741559503871498147369300, 2762811224902983513376710482623784838280735776547237825890477370096934761016500539223756232732080739214727621420243149155, -94010369586391214573360198243792576913246957568820248986467729198662279371126904420638333804585639798606189412938876700, 101750439759936680477443575591714929812457429717136554339385912289347380548652749928190812150048457141575724060412850, -2960133523621526797257379955124331892135278024130404152033155571416451738961611932865829267915826838455000655083548, 3010905827329249748964711306451078319368513758701206276350568303488369090372519419524186015233024369300561046325, -52981596636217194000589953647211358961684307893955896157761316215879054444299245960869158216073899692641662120, 51808066595436857347620815858929939619663406594699045973662573089400633490162603942944597761908667828472170, -656878474628002201371940729605947966842402336059421192710086299080677267459644135493245910552201937709200, 631377189790836417091687855249289703180591267889643831566904254900843159740593114501579968541613332315], [51178141152588798705712152141956336686754171922438947139194284879083211643527199004395113155554978257898120872706548281145561082041106062609999121434127689131687936, 327105580722225304807890022364511935977995952337955860788659575626243700676616319597266730208606052814712191098476029523684779938131323574115053969081358387900416, 9713345570058743707259781027432612864436097704411019520767523152422757709905869884879733112224283364363388044083600012299662283001024435222509576389453014106624, 32702476659592441309951728380492465517978834083786865122110926733408892565609196850775320573763068931331242923363710476106394442621350518021845523242066170688, 1080792729202848970433508451590392268486111700487068062149478880204020015964108428649327104320256457488678620282076933055244401004728610304306692841484414560, 2701981240032319322494289032697768061487227650538897958093743669264064885054888851414593339241064249086965541635216547757057826839109982695485233078298968, 71536085561086486230437819464895456575811497858926434188823186246055573695625732143406915221304837962957380982935569595317706741232922214180126733995780, 87630314280708531994423594635149411453684773770445734274025071652485790407853579701525091735639137902018319312125931868593305125911845428714489223289, 3242405751635168968037242142182079902545103474206721431601981557376814065662990300689747395842626307795722502025995870128129018224671994447899196652, 1775938128803389275635678822638120426146338976627835403981717164040964881714407865255072931049511006461557784736667719276364670850524415808361974, 93588857532321654956230317011751902009817626375602123440488054089823605555734177995518244263534110145216836196583272245271971618865957116195244, -88723640878167152433973958070464517263055715367323289154562508330572934747804881388943297210660697221564940826476103145197287234300365305137, 1680312019029501828439000460378509797986820539133495321104214468657066562682393963794355813118940776761510372187184933703740666041530428680, -2885782048711333291181959698901461253498611201620793665283241008307779619555162549621352081550861671522557841473529682526326974920675682, 16501776722266761613920214024172657516498853292355445106520753179247702116024475758024639505316652059655914599841734730322094785705232, -75288273806188341082915199602485613195585591115875323123455020871226035383566887127857499860517182645243916792411956154692657530399], [-339339965487301697875761693607935561685925171937904350530617914614077385243327735086167581732366387256737209314197395788032150825347285684837761903549391088548184064, -2923783375315649137357830911760333097869592246846400454672201245630001288949923442009372983213026026898680320315560675983627630256798736088926941109359157256212480, -72399038632464749990304955622991882153944537611796057713324361465111110670021150840496879225658142438554970585399327391848461791920425809721540377607617259396608, -412920765838623864885443515799563134532706470086561478483120612420251125169882050662198186146236803851013091309417282745262535710536564296688307259933026772928, -8296348359828542280177632666141863630715738191665101594253362433861708179736175094147989928928263850170834129374934400753501257332079987678181568877918693664, -42409681067087946329964043607286070910708397920082810352609754449240772426256934950682300266155296359184070430706786843787948523192089497978506535273066056, -583528013233518602988664999581978534741015028274812362973547675797241117170576978966651483513301994494268745237506533146267400978326880077198528097015372, -2372080442643235211930262647385187170618216453302742649241071249530001918570413248003145779596114255021703792649917522140374918966208893202196027453363, -27348797342716809938197537638861474033893663651765018700920398189115056222498944944333450150867155358901916297059885715725566858366275809922203852004, -97799445328387089109735314900487508276620117429508775813940896968879468971266557679254807756121465201803057012686648026459035770485589336628077074, -849568088204703994053203576317746595808570556297747570667546903084900992332814585421649403914817887731762081784344830548415436251813643834283588, -2150101700518702297971513258296797589342580352475766629174223874021963935380167340469993907976013589038294156957734699210968527826111033880293, -15789601366131852593770426654442084930523055856878852533414160840211677574704042967916000575110028771984260476116534673294378288489076304664, -32560875582972300533819126718253718101384252138742376867057623947147561962942030925146455427958489841615973384856719301853914752886369226, -173485034541316513101378772492878780198720352335877140353053172269517439670440093580366978566801609227062561337092547485590299881450960, -85132026630928409977154992223848753711612217438555270323065617223681515320905675774353624016177570223625400962134462965758538241963], [-1124087561246798286990023198589225202692124167473495781436382464187402669768230332201673589765176055068506677687923548169432257385953575735606855491584, -24487704385480733126950220669912528125363782971367383144004987141572791518619484386203721089811795340005831591940592220181656791799040604884975517696, -341825239578909723164885500360376561511453897014356884566748295541638616114983113366832323762881932317516834216562782022303568280748728501290158080, -4603123917406886446890704257880775461479219317242324577044697841581560602609171916066794403895639849507731704626238331589360957941642341505054784, -40928997084331028799436626880782320485660213402782065562253674697944045746491371966179395318665974573446414262457713520936875261379882347675808, -495974280852613055002795209714476838464374225985269892029899479491220979246622513795752425498700009359028964667160540755649935500997024398200, -3316389392978541175678144101065166338376114186847334015790433776529292587729375947602403347177851992364722035547563049687717165606392744684, -32758065477727581507929062204329090262729771641943672963471632912128347319150507091155311011201255505616024581543889495450197459497887105, -165743374358761966095063013603934200964610715810013134021250398367261121650844244973612145635192494876862693308183886256554890310537980, -1480170463609006266489801027603765939116569368402069825903615915826597818421182900864446730745249259486974417106596763824641341473542, -5909964863352183307344742380188653323417354898987763860735458673574489419839880025561626737997248191581760475812484288237602160260, -43202060671867744988370587686698010265424696556614187023500971200069598038836944173444259219022193721309475212730377288226792359, -116082429276496693505547013389478376768415908202140844240949537200272383052987649177797673447291608057932386021440727389875128, -778315973001994651853764674131504519845408112160772867225575748110452770521296709864595991496430283866680892926593766116750, -1500940812560431905030062018000645461533504027184604976393603404139524247176084544995670533957847541435042228172163459352, -7765490592181853239375784370724340947210461618762233936543438558528375673689626318948771844424335550935502530103312457], [290203136587510209758317285419850129559991609062911010546912354423752097978461536380881288497271544286839900015828726892314371250789490655584155222196502011856158720, 3089988105473284991717646862762773057151191088895415016749517547577516718553415027081692673467494915779974966493617033293703919750813412649532332787473610351095808, 67260021898819480913905336904579545258573656828962601051537449549493125055215054600321645414383426991798787403394511734957446020219931537285570430616540932184576, 467802774041942543140755291329939511607289255657907158494329856028568828091234872677620350526424972620774477071209117159214992499792876310497667382496416908608, 7799275274776905190860822500967526311205821741685732074038411944282612039415528930681018044463835830607448209969190225942566439812729362504560350038277797472, 48996343742284466597739594829726851441490170645064825393344563733978314863147272573469265591578472059103253297443014720802307874177785713818143826390805272, 579106729930335594971116685859254780013260461909993910488056382959893145921390941185794175798350634492609368146057689227617294706892344571049932226468356, 2887281679381373809739610193771005036420182267274107681752039365015730402331596715624769164163182419570812861265311252327263548827299069712161867110961, 27887418485255500457552012338666486618471410684424779540323277568317322134620795127615751511415778564755920416640326199530882103164973794414034680908, 123632845063687585000108866967605181872990168854870350203894336984691504945221391804313854670617356774296591744059998569721070757274869126776082374, 921337195234133801876448232674078196026660562018229627668580994730180448982895263797447730125900860926250067486157753941112653831326809135954476, 3052536825744789841579647075786896264781494421030361373045482531783725567580435998035948782753581538098803238397818783805587034119052565704023, 17597138396439982077179728222377961495648669593429910554221593453085830119576723818187169502426562898433394157747741212163384692793900855432, 50195301718862453633441626763894312833131482316952923907754271259059977163953030656711759842088834609348329487979938917791861905018189742, 210655722210706503956807373412055101054901009859689341410875039371325186252957485173000177216331030248300357986796823397271546961751216, 309945118374549916811235298095564665876474770596698559316527604035382879801202541619629410479783017095473599872176441777338028751577], [7734461654647299872526040646283782963896907117083993934346228768028346074159808594443052078721894477135421682909253931089152288995537703257925260127585490835537920, 63764436100605502641288374517678472345958831390202215867712000590326576990122062254015930916383223927811581644250126159701058866649197626168492645589546366267392, 1509758036310932434656678439217519428334270889555901314762570111210426873596646234403375257313987591972514829665538999641489222600996350746551263669814273991936, 6908884477279732440901577836292708471337603426902047862864635163580497852429930888073753716174238712046109407430366530162225873100032369999875444167986384448, 161712521572697772789674847732656284177892831985025877060871919782319164024485385357713336683638066665209100966678619038104124392433405835936785064230635200, 600599348506502780590074429374416567873581914437097065152493673414031155961564716353673151375171475641974095688633251878584320883593351146639311899985464, 10697044084113523620968527761997732878629372782402911228766113375646036374624971030101824141467280535612292675294189098383458570780042470222764719459480, 23072341780263515936002683809365480716876772142470822244720002284603825223293648971946286097412601618052863482486636336776729381812752720066679116183, 475271892419137294755514845711310101776601462049354439810061801325990185365221362921368064906264816312886661371279010286908598208547514916052233916, 676490542699784525795178324975571250482835200395947486232431984443844409608405694834434826988909505963054216525681667370123207462471397349456058, 14018597698716664680551929677740965487060666961347300105336360081570207289629896601877219131858758530546905379467260242957770351042937443544600, -818916986313543783756604936755012659974793085452834259602990355959185092810199711110577098358262992052741353477733143193133942645014199343, 251898991608448224827658325297786666319247388546544898723347617305153078969364386181639446895786945512398312415111570243019926586166646400, -191633356711759149677793105219801788913735010374855477237165057444528012721199035455199541732771950759046726911347918865881023944620606, 2649464222480022875537854471769828389224922305455883895435142262650230613652989537988848523161090425744040139046092339734560620196204, -8204619716234843771773242469848080321141831203152175651567734481273839711267001991246873044008850738795863923197358203853855035873], [-1693283117559842217080103269907617329688551091571121072707912063162129315817717808117761716861423685796319624644493739342684702457708544, -63009959333144625755686924920029784066178129629919717635050598021294241462376330560171196129013976736002612401467198151054099430539264, -667117934750521655070293113064718488045030946335117447156672989668308121473539341871826239243627939363433571165041634039422048471040, -12160935897416784135617952166178991219469390684277224448207091345166716848966010419690134769137293826151939911316272777246402995264, -77576153656720687245361220918454239102970267531619641692313440895715793906500777308554381160406917545598034746605288113384574880, -1301606197323852083864511896957564002230881919676779943756993890443039676213613028771720604789374872351537770345162000133354680, -6378285704067008240464119329788014231333174657384029858945031393180347989389390824596916672944873135182963726136229782505852, -85937207955797451712049954642629359138370712281325087782135713879573514021893622189253939475300084227748750061690164088025, -311661573423343825750430969124466270166329871552427498885264913291484453255542012291520970760356337036321902776076592060, -3801207987847552322071359831975627101650591153700705582445172730412189790292755897752659155895829935142935725115660694, -11195119928151426427616363887103660601461369532742209585902536066436330481704422656252626166470212903163480807628020, -112625164170516217322808266036213209298261205386958656868191747044352496186053862425605969216442567089411602483151, -218034339016066008961840380750529952765777147811670884841908973738607679774964789643876505697347538650802088856, -2025982155237463615171174137248186534466798938218566151223442755941158532989772690942230872482039274394632990, -2863701051114375646328674085145677028576854263801591504998178388040487216611522651953925275884258203282760, -21476546745200430252225564266110551575889995392534727093976976045055275095011820194543235994896925137313], [12255090248750058389438179873762733731906568958868960475429197986191594137574904494227495589877728469117424236102613030507777534700327607631538186022780380082296832, 26132426023723026710471519802686715308948346001932658384413777205963970872358554366469128576926489952941807139680626993609241342190415035954725588968926209368064, 2062138671941699576537867198742232013418821291537974107591484973299888506501822313895409914056924262055683901507376507568611283054022097332211473062843954757312, -2091632136579194531136270196399546416237160270899301662805903647738839682959623531338186721821524682559126753143275197321976385193674759590627384481109916832, 226856607538456629323845222594651344279193568123757622153031098868481230154384358128192171020938407665040608313808895053568027447847941404477299376757702088, -415398647795974451115471937039347796496395214329434497524648499526997273660025543503958298745336494293102240509002802081826920789586266390263373370446396, 13940984995258188442609846292889947757659253952273372417611850080028570288127470240997919643123386112444474218589905936817385863387117241206562383987699, -51749334270176868987304547693119232823263226257803348211906023974100624525214067731093191777923475482274285392758491929186333758950494895593803469918, 607416396032409659492446352327032967045553736960107220805868039988627304810633609880704701720135873515227916205809341522483578572925032579790685866, -2889135945144683941378476258390642061726544141332682625006404383814450161592308422376222424458023367816950180148852226213479387963262892303264976, 15467270337659924347364698613873511860534175247445967902558028842610032005187276055112901316081443440512732274772548674730277532338163042112677, -122566871870992926893177364663569974882711949996495697222690989952772248123022387665663414038699781381423178132006561670510617868137389917942, 260541103169797749219320306647538414887418291359936443687310489748852129258012939663288017679671897291097534122410960011299883516867036618, -2551663083008768594875530323890355302484651056048041079599700598360259437181580425693893339673532566638976057949768634852647766040891876, 1882021618620008448211237208121089317201500093750305151821298427165836004674853699854885973315490636410837447123845257239483649078003, -38272544367604173814192582753548754043942890155343655874197958706968960291048597927679491094024757889874553750553351326438614310690], [-82119224755416360006844527615516691772445090237159264199495808059606954772326571058864816068549303596768123870342660319130604404243215745493569408993990112118784000, -101563623745532009127281021532189687217172187416058977851378769182662959967376643823475057476270293406876759811387597637989700216652161011135380333744410503446528, -12654425621908879575356911932358658960599008279012870155138177192796544819576147557568551282538185089746827735002432269245495119645347814195866457857989789912576, 34022202420161110919039294432443770766828212079577753786280386809646847339558595702405372353691081995722953271047603653847459476500295956184435544934523496512, -1329360441555669280539560080247133089750216034463669644746519646752970650787170907089037068729050570152496907234358736788561305173698261833609859246961734432, 5220359775608652207126886937831843416001200810138299117727770790451391709759990986990564862558032251755279948095378204659784093307329167029610176957677368, -72336470254663975191971045367345223143405579766312103140184503806312398232770396351867152660856840588259042827481335971030400325425209938188369288499436, 539642400021404500583286461004799831802036503250273421201131434230870950069635031947974009955363238335869130337634504370744344702517076880622352908789, -2865908280011761606931078313633605435069856407932840726813181252686921902369310307252571918497878090565468335213211738758992836497816805093846098308, 29073359155640551907155926596216555509348409947488477614386584587311035511777448913963649573889016695537223339569409130497872467787030651179590686, -53563215394527860578400443910430673206684054749578692220786165168196699295778804748226123198087603697187209141554433916847521215244356906653476, 1154077630441239013339138791242563697507384685424930341514990539408980443752616344349542514173644748221346160659646042418450029881963987501747, -696200591433596211919685171608474694658586529079501825116617114679528364844245465730841028565536327123546646445079241614696257722363048792, 23573321801665080795058992230772684197977118114549123135563802890516195010372961872589613973490198769694962455503939565622439514134193958, 2539983357756578514768449460810888030023318539575008905097939386226015228964109185055923303913731720126202876590011466593686370687344, 336640554796518432275404932330835359654835905401451146957382344564044293204178765689404144195866016147340351257040755671606644678333], [365411017445241143952661162787834652303614069908102107330572057840215487867945289049357724341178410360538026101934950885699013614262118716289031692538703094012740042752, 1797058772336940141605366984990716134440155090024895296839070002684613690199085212861321823502323829209962960134282091826316019615084096917466395117396789566693814272, 70117351770095046714509969575764359750792396377729666438297396042130486837306722991924547018611039481312500149376041868600459101372255242451919751871198724768801280, 164695451729729376636044342178444956656127393827183722071483353392920915371990130377316432227297111645978419750647980911908794276011127993628399344470816478300224, 7782610686975381732968434866253882243338197633700158417111218175543044500662402069552912085492842997441718258552367659029903888639392113659826517820923609791200, 13920592093473430897377909840617019783270278293881233792061520206148819573108303191053214586225533298311298390296636615998979549508489376221387396832217206712, 514892230884509128960204741740000211785669196877573250432932641644768927971760702593793829126954541495221342531500480969200178310633037921518502492195887540, 367602128225121893903299953197407604489936823883573309242187755369459041238048853577700863162335384691779047664207030489861276095557958739097326398293773, 23208630432092237272410603571003403222799456873375969393350971328296542234968282260100245647814426363377719472936000232775137456250402267023129423490588, 4684320559151420392223176276489422961130975136670221414466670629918093739767034448572338478684643964541651906304839419068963456511372674438359054958, 671502007426083162907896120756741920909936342245214731163301887438724138853583189862023963924217066699015830820688031305166530403234716908967466428, -714076351298837795723639640481682217266872923886600619357596505556054879216109918171587527972448397069357176593292560372630836908564337356471205, 12048911849203256830412888496643077740796983247619281726119341435908677170726776977444450522395191599839218501655375594635560812135759673812200, -20334956072972867759596211610112187471170588157171833776038392390813939716219148371251785642587767487071173021688210701545456050680823156042, 119456253078117736380437494678116970257237344454597627770166681731185258223769103390343254064347485355927126593413424046376327226632223536, -487392817611319719378926305790315907427614315620290361174939914865531801995441355535399590555705521228740109447736801500036136208711403], [-14573875398508656857790047875811634761127409804318052333212676658386626745746227023802584876730193715139674762740670589886095284912392745785562898119639040, -290355126210896569775790070852671246983121170453862321155356837600217767159002754854289607648547359139425181168512861028657051041554828487263138664448000, -4737910883600466364671461052273511798850166469591757178318935682147887060559724607577257539894092009304349971632785724051056909125219973691884395530240, -52861850280341458537877725682543033130276740449229119251592433922621829966460281569140205043886287923845924893837772830137054809573873040050126443584, -574723077970003330858204517694895799668206731101578679053090061205577463183769672840941140045421652647444240581629791683427930955566633699778161056, -5798971593292680946228793056910226439406638735701873249521709824634302051153940635802643203155134565476550775220238671515627795966260665541039160, -46879313355033166318781719045381938295922239193796384701279721326656526215999711153567231641221096453304287717404292755656124381240680440847772, -383110421032077343273922700744893595821042383988361602519250962186744014791316736137725832798177087626506168536189210333975384897234774622185, -2335373731801805368241643845112130573472718918957983986134477728034155370951706430557516449736782409683980893190348042447266471389145493180, -17381778119324084503300267619651794320490844511043776855090200523723438827717108980252579737840442099084901620788800804012590607955766518, -83008506068586030576239776909702208916286216925980856036220754044345276460515925418318869646753143568705970843687666668492570393090260, -507545583991452864067059737008623131772141778969653025654133573203150248821985465838194361049312115900432315244457288078871256986815, -1626999108095893708009526047534752162108826077503513985328767729089795576806921082108548831466673856456988423759969515292090505048, -9153597817664668380114586800800138095698339925188036839427499686807162357438163794691204321036875867199833454592872149897858430, -21015401124857863813685703155280340994010790773415341866148606438792483286665001382843727548217346018015847785606155328002344, -91426883331402106788415586311808387092318409184753473089765601856588656542197409572327536699262354196057370400142095026609], [640889542429352257640578052853402011761784880094221281865811818383921342644215156809422323019219277085722069828172932803073504813726924264474881212034914520058425049088, 3072190493112457575062916667272340198518396924806124603228066426997125887256529607586568051425765482999170766960539255279491204209717704409667737314652807849234976768, 121419681078747283753853661098172904287422917408272234377587875407875201496230679237813287031499545562884486907150382015480993069405541253638263492219241459009078784, 273832171851678165479679937635556458368745142860131401643222586649065758618259960392591557364065658274658198192235184559709031030844823072735853124336445424180672, 13655099958235347092511243585595843257216622842539423294858216073396412058546470359902274271168323588226602320007806052544862920455725864904818672486853100496160, 22991283778734967032274167478159176292988532687734834823162295047500791657050702855452889682691530846142313387937651171716792232848481048703039269267333002120, 903825873744135905080715168429665427312269955038047180299042683850856424407654952716611265389888982301445723331712326993338521184868531544880416330739273420, 500795187431989895031163601201002547611708575837535762568140847087412660815107972699942702699033779789538771628046088595569568451371743765331832058630907, 41106128813789944847523303805265658768568940894310953143253886374384429368322572261053503715166270983708088680750850340123819454952058412559953598402180, 56843973356023554689814400275092659829876553546738401686910085395091725570423752898923628541748324124993485520357023803347652741778409661369505602, 1179582755141542063027452903465407079793981975561123412383413340396162108321148721841179254201614124262460154759309469296508015657027216412542319172, -1659067865687798555120551047353757067375456359236787892558333129008926189064936761985787235185674523086227114764576053307211861858399038812972707, 21164074474968227170584373401867044304326509571343011936488018471097860462098658732301714445448605143740541904754690028180487539770051229437080, -44614198668119109896477233642495895378027919249061057616412335378524077973047811290618973591660625204272759212877948480257312977138168477254, 203679086961673516294600409420089805563522413071787428008886069633458180229580437526676280683634796619569099068813629733898084976050974128, -1008447283695728105578140356894060523550116928980455254604974328279037194610077965332475131052857957013426353915175452387660369688734797], [-14750631905892080686562586195054456580992809463593946882178171716384774639270591882850830315508369282175706048182937937517276792335573323897565061502541824, -263386557032271901561057137575716147484504723517046691997853041336187833294023455064238558353209540658890254747483392447389058118898119723718940243951616, -4371031123425550486257855856182785892410011550784971138351132020885045515053045261058792759281867301915817922841134661219695389358684180393517975398400, -47334478018538637906563106965277263146375135997851697005207655644560948156155942055252555062283420849221330313290889387311922583689712852609266190656, -530897915316752763032863870081205789440213951605379878877975077480654189677327769819556719221556297282203569491713338879746706749123139763670018336, -5251604840325818226793628319633107529056592322111111769517420179952923391838873533180972059464937814170343557879655685681451688760907335343326680, -42978493926305754089041831735148364094474835448923667075667746857943218412735960378908955975783870102555944768699220546598758061593035384465500, -346959394806346085154538283228534142487993003205613949967703871681010102138902722381600375550200981324834935119798026466878623553743002480885, -2158014281878654612740591263258063584411481783005016110207041187214566046426784842423326072661583496169528043181896983910368786973173400620, -15847229932173148635858696989223529023437021887440303699460094805222827728937015306097548871293247296384808847700958490714891674097585086, -76680642193556727276307410329205681752156634497206531017960366086416112108112001453947243170905624809440326067672021328668080757750740, -459900848307578515254575976809325813136448634395778549245166474992003855084001501474046786500437813640994627818258162423423877963859, -1509057673453840981845783108558893482272724109250308774290491013339003156365030964210251189722434805323880954985643474074061337112, -8295380939896346775659985536914938646023834177034006737337821879816747249747825359027282379628868507573940550227419044803426790, -19407403314713412425919238661464439191278385269020955941690574275833460263948913218753964467401603600602984860597558193775224, -81046592281360693608325110139085290286922882269841401351512288325450144699366457321609374291727808259866955652650050543709], [-2012095635102849701318285591669350587623384465238865605680228821639736622385059747657102397095669578244012050782995026850549226904704591828407429206427454880403161284608, -10295636058209850883153720281747442463641005174684375518080404722800956754638108068567029872654027720188525343523649782794585775936575942850694298599961126177981739008, -381128523292601331175479464093690398864351113715192845430013326389263006907167018550840624954608226196476906445570024300120277270839199364872331454765196290945012224, -901437577931259932632117818975025374317784622205744522655071647290645836163963633594563727429414083904218414152954361827590426728386842340249709339950957274336832, -42753301954617467617641941324832877523173980185225964831702018196703380233273412434410531275883558968120443295459518826190630969148762455342422300220284373614560, -76851872301515101345519814567786391811957330648225380037632438301286315422693155203587570303264570060457130713575539603484862695092058877088635981202748322040, -2833915146440087953485194630825838195728927670928961515501018101176223452652002148167940344523618587964225254967942225800712585616288730785174449136495248020, -981617699839786031105995632712853813172395193805783567919216417502687559424770515789271724923286047837099345025340849177704862529194662836181098861806917, -129353889129991906039359028607300941010846455490861010839484174207150078952491043082367231098057312209965222651722720649060957550403934677855015633011900, 49683816833838924751280160074852912247754468276071953365031160127449457673310672253601977932267710636868799505399730519382836471757023214898547670338, -3710978234867796102225470655437455760681079962646705888987258887359574438404123708496504699180722297337359460681755825124297422518975634619982524252, 8518345390242156906230539654107040821218899387444966086311597999535675818915239520291853693853512137569971266565597329125002313761425042501357597, -66588150721492362278252628520979196039268867302511258981593878370935878993412888195004516515041585782941175235909042372273128852427216345754280, 217084666994688279787406425009821595553653772521370464550282389350518449833776179138503322141478689359456595312264099238610958442074038191674, -644664691504829449901418378235359582732150317815539096950895401592462289846020050713308825789757174972979198216670836997544721098756359088, 4600573340860950433883268826432958164442934890377354510972229389609998242386376828717640990862526293129592936739007526775625014742456307], [92872270541358717058192907157114768598216711614416793866519514238908409311630021483396479197949455345217171870680026280975777590176591763266800900220633088, 1994445648013561754087392982259976021343509581245686890665647590454957940769420471479632758709514418778983090032341767240843738422281118096691412170473472, 27607028899494673862475552358492984759898594070695890438593183949373997056258421758967967237997189971118882648520524820702961511007012225370734771456000, 355067890851532032461004161411256180418748783068776944585171906292263090210238048770002898163842061396987868404182691081942584976906762005936171575872, 3303041143652439383658095176234754022055912973214167779910150870385373454160102958440811966838707264581065828560391873354832433276262178691624773792, 40423453486623842711057869349393935323320928311422286173135297069018176483493725975948647910394668747582600907281083040267396193895715674520042360, 266213718657608748126454396403488409334085462502012968386414347362928665587412281445723937241680950307856712668558619871040916114897606864632380, 2669850424563823895779120431630041098166944589495346874396924069043033149285355192153791412169823014946498270345478513835502866831015535913345, 13373045451171540399079282637211453427231118241216383679668714123741792703191019540724680942961092107929602008569558528017865511431790382940, 122596109897244643801848268222390499072244138015611422861947889009031887503041415007607153924373127833926330459656056255171911356069954182, 476937247924018473727314307718986277356475939765487430053624535128194596801776867586564397931908520516263364352433846133550026566259380, 3520276398492880977654312868290680272410640616269921915868513633916319885860280727759205156726002857685634395364471628489842650371303, 9380088302990027217737186717267743849366123424175711493183458068911826655888970861076225725615910950041889125192028403560346943384, 63416950384482149598785408555283796901647453936789772269077709615131558075609740127366892161397293106836592105014049475514042830, 121149244649532014034297659840711646533326736845090547164245325646550493155579524757746723030783214377999525618912364929738728, 598277144547124218109154895638248750459032025891457691304487396459134374750017574967716250928105403895421234076039950546953]];
    Rf_basisdens := [1, 1869083020321756322889483774609244933494041309000073035617806057199369285148238793627479441046706036529691966060973685578868501782396928, 12259989422722606400257576414051718585451414073592913734214519922026175623967563025329843303647406353381801321909277953125208592253999956921264072577382446202880, 12259989422722606400257576414051718585451414073592913734214519922026175623967563025329843303647406353381801321909277953125208592253999956921264072577382446202880, 684400858157666305030680562396252464185762489247764846428642455769582610332107446033041541461942473339156332198829977893194630117928470682789847040, 12259989422722606400257576414051718585451414073592913734214519922026175623967563025329843303647406353381801321909277953125208592253999956921264072577382446202880, 306499735568065160006439410351292964636285351839822843355362998050654390599189075633246082591185158834545033047731948828130214806349998923031601814434561155072, 248145613161796399974115818319741423326073426740636726538537870120977061659591151880087829634882096750995994821707769592713969647616, 383124669460081450008049262939116205795356689799778554194203747563317988248986344541557603238981448543181291309664936035162768507937498653789502268043201443840, 3064997355680651600064394103512929646362853518398228433553629980506543905991890756332460825911851588345450330477319488281302148063499989230316018144345611550720, 723339375940633777615197008429051396541633430341981910318656675399544361814086218494460754915196974849526277992647399234387306942985997458354580282065564325969920, 80759301262604623993620306362757790773919973731236251878579809780810748019188678631898901892509211854020447199461937391396966353915559540569201950720, 361669687970316888807598504214525698270816715170990955159328337699772180907043109247230377457598487424763138996323699617193653471492998729177290141032782162984960, 20189825315651155998405076590689447693479993432809062969644952445202687004797169657974725473127302963505111799865484347849241588478889885142300487680, 723339375940633777615197008429051396541633430341981910318656675399544361814086218494460754915196974849526277992647399234387306942985997458354580282065564325969920, 80759301262604623993620306362757790773919973731236251878579809780810748019188678631898901892509211854020447199461937391396966353915559540569201950720];
    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_252_k();"
function MakeCharacter_252_k()
    N := 252;
    order := 3;
    char_gens := [127, 29, 73];
    v := [3, 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_252_k_Hecke();"
function MakeCharacter_252_k_Hecke(Kf)
    N := 252;
    order := 3;
    char_gens := [127, 29, 73];
    char_values := [[1, 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], [-1, 1, 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 := 8;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 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], [35, 140, 0, -3, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0], [-1765, 0, 0, -2, 0, 2, 0, 5, 5, 7, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0], [5289, -5267, 0, -10, 0, -39, 22, 22, 29, -29, 0, 0, 0, 0, 0, 0], [0, 0, -14, 0, -14, 0, 0, 0, 0, 0, 1, 1, -1, -1, -1, -1], [0, 0, 0, 0, -21, 0, 0, 0, 0, 0, 0, -2, 0, 5, 0, -2], [0, 20582, 0, 78, 0, 5, -24, 0, -78, -5, 0, 0, 0, 0, 0, 0], [-81085, 80910, 0, 113, 0, 335, -175, -175, -222, 222, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 56, 0, -10, 0, 0], [83805, 0, 0, 475, 0, -475, 0, -70, -32, -507, 0, 0, 0, 0, 0, 0], [0, 0, 178, 0, 178, 0, 0, 0, 0, 0, -77, -77, 23, 23, 7, 7], [0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 176, 0, 18, 0, 4, 0], [0, 0, -626, 0, 0, 0, 0, 0, 0, 0, 84, 0, 75, 0, -7, 0], [-539378, 540456, 0, 390, 0, -786, 1078, 1078, 1176, -1176, 0, 0, 0, 0, 0, 0], [0, -488815, 0, -5895, 0, -5298, -1190, 0, 5895, 5298, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 882, 0, 0, 0, 0, 0, 0, -293, 0, 75, 0, 19], [0, 809240, 0, -2145, 0, -4389, 535, 0, 2145, 4389, 0, 0, 0, 0, 0, 0], [-761232, 762044, 0, -1985, 0, -8564, 812, 812, 6579, -6579, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 7042, 0, 0, 0, 0, 0, 0, 1372, 0, 39, 0, -7], [0, 0, 3758, 0, 3758, 0, 0, 0, 0, 0, -980, -980, -140, -140, -84, -84], [-1697780, 0, 0, 17080, 0, -17080, 0, -2905, 17595, 515, 0, 0, 0, 0, 0, 0], [0, 0, -10178, 0, 0, 0, 0, 0, 0, 0, 112, 0, -410, 0, 84, 0], [-3555605, 3555065, 0, -4782, 0, -23037, -540, -540, 18255, -18255, 0, 0, 0, 0, 0, 0], [0, 0, -35266, 0, -35266, 0, 0, 0, 0, 0, 544, 544, 459, 459, -59, -59], [0, 4165446, 0, -15181, 0, -32335, -4767, 0, 15181, 32335, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 9338, 0, 0, 0, 0, 0, 0, -352, 0, -545, 0, -48], [-1957460, 0, 0, 60779, 0, -60779, 0, 10500, 47627, -13152, 0, 0, 0, 0, 0, 0], [0, 0, 36704, 0, 36704, 0, 0, 0, 0, 0, 595, 595, 270, 270, 378, 378], [0, 0, 75922, 0, 0, 0, 0, 0, 0, 0, -1628, 0, 718, 0, 228, 0], [-745289, 0, 0, 73551, 0, -73551, 0, -1762, 53230, -20321, 0, 0, 0, 0, 0, 0], [0, 0, -163002, 0, -163002, 0, 0, 0, 0, 0, -1112, -1112, -670, -670, 156, 156], [0, 12296463, 0, -47999, 0, -58485, 37632, 0, 47999, 58485, 0, 0, 0, 0, 0, 0], [0, 14221480, 0, -19302, 0, -82806, -26670, 0, 19302, 82806, 0, 0, 0, 0, 0, 0], [-10584750, 10535470, 0, -6954, 0, -31798, -49280, -49280, 24844, -24844, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 195538, 0, 0, 0, 0, 0, 0, -8687, 0, 299, 0, -553], [0, 0, 98260, 0, 98260, 0, 0, 0, 0, 0, 8750, 8750, -593, -593, -630, -630], [0, 0, 192458, 0, 0, 0, 0, 0, 0, 0, -13319, 0, -2505, 0, -419, 0], [10998415, 0, 0, 131546, 0, -131546, 0, 13743, -4705, -136251, 0, 0, 0, 0, 0, 0], [0, 0, -355306, 0, -355306, 0, 0, 0, 0, 0, -12655, -12655, -1695, -1695, -267, -267], [0, -16160685, 0, -78922, 0, -76170, -8750, 0, 78922, 76170, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 108724, 0, 0, 0, 0, 0, 0, 9374, 0, 5483, 0, 506], [0, -10081680, 0, -101716, 0, 5580, 24808, 0, 101716, -5580, 0, 0, 0, 0, 0, 0], [36373944, 0, 0, -46192, 0, 46192, 0, 33824, -91080, -44888, 0, 0, 0, 0, 0, 0], [-44485245, 0, 0, -373282, 0, 373282, 0, -280, -13383, 359899, 0, 0, 0, 0, 0, 0], [0, 0, -223092, 0, 0, 0, 0, 0, 0, 0, 22183, 0, 78, 0, 1442, 0], [-12644839, 12616880, 0, 54785, 0, 351803, -27959, -27959, -297018, 297018, 0, 0, 0, 0, 0, 0], [0, 0, -466172, 0, -466172, 0, 0, 0, 0, 0, 22748, 22748, 5029, 5029, 332, 332], [0, 0, 0, 0, 308, 0, 0, 0, 0, 0, 0, -22056, 0, -8850, 0, 26], [0, 30936311, 0, 452983, 0, 355095, 73031, 0, -452983, -355095, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 278214, 0, 0, 0, 0, 0, 0, 50526, 0, 2225, 0, -917], [0, 0, 182668, 0, 182668, 0, 0, 0, 0, 0, -10192, -10192, -7447, -7447, 3192, 3192], [0, 0, 89404, 0, 0, 0, 0, 0, 0, 0, 17234, 0, -8066, 0, 1426, 0], [0, 0, 30303, 0, 0, 0, 0, 0, 0, 0, -30086, 0, -7965, 0, -4914, 0], [93872331, -93714775, 0, 401325, 0, 702143, 157556, 157556, -300818, 300818, 0, 0, 0, 0, 0, 0], [0, -125664320, 0, 416333, 0, 348487, -109305, 0, -416333, -348487, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 139272, 0, 0, 0, 0, 0, 0, 13260, 0, -6445, 0, -3036], [0, 25364365, 0, 367513, 0, 842788, -86650, 0, -367513, -842788, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -471465, 0, 0, 0, 0, 0, 0, 22750, 0, 8317, 0, -4550], [23957305, 0, 0, -707579, 0, 707579, 0, 327770, -429690, 277889, 0, 0, 0, 0, 0, 0], [0, 0, 93572, 0, 0, 0, 0, 0, 0, 0, 62734, 0, -1790, 0, 994, 0], [107920725, -108016395, 0, -504506, 0, 61606, -95670, -95670, -566112, 566112, 0, 0, 0, 0, 0, 0], [0, 0, 788249, 0, 788249, 0, 0, 0, 0, 0, 88214, 88214, -7897, -7897, -3074, -3074], [335010805, -335490487, 0, 391400, 0, 662149, -479682, -479682, -270749, 270749, 0, 0, 0, 0, 0, 0], [98860945, 0, 0, 674948, 0, -674948, 0, 421680, -314044, -988992, 0, 0, 0, 0, 0, 0], [0, 0, -1529682, 0, 0, 0, 0, 0, 0, 0, -24957, 0, 32353, 0, -2353, 0], [-113357482, 0, 0, 816648, 0, -816648, 0, -268016, -831600, -1648248, 0, 0, 0, 0, 0, 0], [0, 0, 1862462, 0, 0, 0, 0, 0, 0, 0, -72828, 0, 22825, 0, 13468, 0], [0, 0, 3127460, 0, 3127460, 0, 0, 0, 0, 0, -104764, -104764, 23910, 23910, 6830, 6830], [0, 464900270, 0, 124594, 0, 524739, -258520, 0, -124594, -524739, 0, 0, 0, 0, 0, 0], [36263035, -36290300, 0, -897769, 0, -1050191, -27265, -27265, 152422, -152422, 0, 0, 0, 0, 0, 0], [136495787, 0, 0, -750715, 0, 750715, 0, -530810, 1179640, 1930355, 0, 0, 0, 0, 0, 0], [0, 0, -1769714, 0, -1769714, 0, 0, 0, 0, 0, 165151, 165151, -387, -387, -1631, -1631], [0, 0, -2155552, 0, 0, 0, 0, 0, 0, 0, -113830, 0, -19885, 0, -4114, 0], [106457915, -106127780, 0, -2591897, 0, -4130715, 330135, 330135, 1538818, -1538818, 0, 0, 0, 0, 0, 0], [0, 0, 2463706, 0, 2463706, 0, 0, 0, 0, 0, -32632, -32632, -44645, -44645, -2288, -2288], [0, 719880317, 0, -2128026, 0, -3546950, 280298, 0, 2128026, 3546950, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2262608, 0, 0, 0, 0, 0, 0, -156604, 0, 53900, 0, -9576], [-95635429, 0, 0, 3577270, 0, -3577270, 0, 475475, 996515, -2580755, 0, 0, 0, 0, 0, 0], [0, 0, -2039170, 0, 0, 0, 0, 0, 0, 0, -216959, 0, -24515, 0, 15105, 0], [-1139414235, 0, 0, 3421444, 0, -3421444, 0, -62575, 2063533, -1357911, 0, 0, 0, 0, 0, 0], [-253435637, 253602321, 0, 1846725, 0, 636327, 166684, 166684, 1210398, -1210398, 0, 0, 0, 0, 0, 0], [0, 0, 4768778, 0, 4768778, 0, 0, 0, 0, 0, -78062, -78062, -27109, -27109, -12843, -12843], [0, 0, 0, 0, 2545256, 0, 0, 0, 0, 0, 0, 160240, 0, -111235, 0, -4128], [630482555, -630895765, 0, -4421410, 0, -5689054, -413210, -413210, 1267644, -1267644, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2601398, 0, 0, 0, 0, 0, 0, -93940, 0, 56290, 0, 6104], [1293288135, 0, 0, 2050219, 0, -2050219, 0, -644280, 2924458, 874239, 0, 0, 0, 0, 0, 0], [0, 0, -2348814, 0, -2348814, 0, 0, 0, 0, 0, -40719, -40719, -87673, -87673, 22029, 22029], [0, 0, -2282878, 0, 0, 0, 0, 0, 0, 0, 206731, 0, -48825, 0, 11739, 0], [0, -621507350, 0, -3325834, 0, -1197629, -2027760, 0, 3325834, 1197629, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -4375504, 0, 0, 0, 0, 0, 0, -338223, 0, 12810, 0, 2282], [1022772705, -1023087999, 0, 5194830, 0, 2600153, -315294, -315294, 2594677, -2594677, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2256140, 0, 0, 0, 0, 0, 0, 194180, 0, -162786, 0, -2730], [0, 0, 2507227, 0, 2507227, 0, 0, 0, 0, 0, 354536, 354536, 79550, 79550, -25116, -25116], [0, 0, 3166804, 0, 0, 0, 0, 0, 0, 0, 302736, 0, 68510, 0, 37688, 0], [1218104815, -1217021725, 0, 2603598, 0, -840081, 1083090, 1083090, 3443679, -3443679, 0, 0, 0, 0, 0, 0], [2049443197, -2050191420, 0, -5039495, 0, -2023309, -748223, -748223, -3016186, 3016186, 0, 0, 0, 0, 0, 0], [814381710, 0, 0, -6606388, 0, 6606388, 0, 2086840, 588498, 7194886, 0, 0, 0, 0, 0, 0], [0, 0, 8578437, 0, 0, 0, 0, 0, 0, 0, 363922, 0, -78133, 0, 9178, 0], [0, 0, -10476730, 0, 0, 0, 0, 0, 0, 0, -617190, 0, -29239, 0, 5075, 0], [0, 0, -14660590, 0, -14660590, 0, 0, 0, 0, 0, 296588, 296588, -92860, -92860, -7460, -7460], [0, -1099788023, 0, -2809099, 0, 6675080, 1592542, 0, 2809099, -6675080, 0, 0, 0, 0, 0, 0], [0, 3161345525, 0, 3769140, 0, -945552, -3358820, 0, -3769140, 945552, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 13729676, 0, 0, 0, 0, 0, 0, 416801, 0, 89856, 0, -65716], [0, 0, 6892418, 0, 6892418, 0, 0, 0, 0, 0, -740852, -740852, -65052, -65052, 532, 532], [0, 0, 7552496, 0, 0, 0, 0, 0, 0, 0, 813614, 0, -111900, 0, 4272, 0], [-4094387317, 0, 0, -5317772, 0, 5317772, 0, -1502016, -8350180, -3032408, 0, 0, 0, 0, 0, 0], [2796059150, -2799587270, 0, 8380273, 0, 7171962, -3528120, -3528120, 1208311, -1208311, 0, 0, 0, 0, 0, 0], [0, -976315330, 0, 19568684, 0, 8861172, -1156260, 0, -19568684, -8861172, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 14532196, 0, 0, 0, 0, 0, 0, -790524, 0, 148756, 0, -55756], [0, 5079630155, 0, 9519303, 0, 15012780, 5042026, 0, -9519303, -15012780, 0, 0, 0, 0, 0, 0], [4908545931, 0, 0, -10340914, 0, 10340914, 0, -1323532, -9568515, 772399, 0, 0, 0, 0, 0, 0], [0, 0, 8133958, 0, 0, 0, 0, 0, 0, 0, -963420, 0, 168215, 0, 37756, 0], [-2832835405, 0, 0, -14777205, 0, 14777205, 0, -4890510, 128262, 14905467, 0, 0, 0, 0, 0, 0], [0, 0, -20484632, 0, 0, 0, 0, 0, 0, 0, -453852, 0, 161804, 0, -10528, 0], [0, 0, -24987865, 0, -24987865, 0, 0, 0, 0, 0, -1136850, -1136850, -105481, -105481, 20190, 20190], [0, 0, 0, 0, -16363186, 0, 0, 0, 0, 0, 0, 1268723, 0, -197195, 0, 21583], [0, 6629764948, 0, -727681, 0, 2480325, -1355707, 0, 727681, -2480325, 0, 0, 0, 0, 0, 0], [1669474255, 0, 0, -8670228, 0, 8670228, 0, 3858190, -9521330, -851102, 0, 0, 0, 0, 0, 0], [0, 0, 19183267, 0, 19183267, 0, 0, 0, 0, 0, -282338, -282338, -186473, -186473, 104258, 104258], [0, 0, 9646938, 0, 0, 0, 0, 0, 0, 0, -394402, 0, 83187, 0, -31403, 0], [2199079453, -2196159955, 0, 4280780, 0, 18138469, 2919498, 2919498, -13857689, 13857689, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 24727913, 0, 0, 0, 0, 0, 0, -386084, 0, -67010, 0, -24884], [9787876470, -9789504698, 0, -14574660, 0, 1039796, -1628228, -1628228, -15614456, 15614456, 0, 0, 0, 0, 0, 0], [0, 0, -15085304, 0, -15085304, 0, 0, 0, 0, 0, 652050, 652050, 103560, 103560, -86828, -86828], [-6762878480, 0, 0, -6451391, 0, 6451391, 0, 1049060, -13920915, -7469524, 0, 0, 0, 0, 0, 0], [3281056825, -3274305660, 0, 4879141, 0, -8062621, 6751165, 6751165, 12941762, -12941762, 0, 0, 0, 0, 0, 0], [0, -7425674877, 0, -11696405, 0, -3184090, 480830, 0, 11696405, 3184090, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -18864132, 0, 0, 0, 0, 0, 0, -473552, 0, -260602, 0, 16122], [8996040252, -8997567736, 0, 16281745, 0, 5219308, -1527484, -1527484, 11062437, -11062437, 0, 0, 0, 0, 0, 0], [5501188390, 0, 0, -2766104, 0, 2766104, 0, -10167570, -8397906, -5631802, 0, 0, 0, 0, 0, 0], [0, 0, 5185800, 0, 5185800, 0, 0, 0, 0, 0, 1304352, 1304352, -409955, -409955, -131880, -131880], [-7900635849, 0, 0, 15318112, 0, -15318112, 0, 3889926, 23109730, 7791618, 0, 0, 0, 0, 0, 0], [0, 0, 19095538, 0, 0, 0, 0, 0, 0, 0, -344092, 0, -270124, 0, 29512, 0], [0, 21386111600, 0, -7343104, 0, -6078792, -393960, 0, 7343104, 6078792, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -26397625, 0, 0, 0, 0, 0, 0, -263340, 0, -299574, 0, -181720], [0, 0, 4235882, 0, 0, 0, 0, 0, 0, 0, -1056600, 0, -117875, 0, -167176, 0], [-13949868198, 0, 0, 12429956, 0, -12429956, 0, 4110288, 12651630, 221674, 0, 0, 0, 0, 0, 0], [0, 0, 16202599, 0, 16202599, 0, 0, 0, 0, 0, -710484, -710484, -222080, -222080, 209008, 209008], [0, -2014774920, 0, -30133076, 0, -24467988, -5506200, 0, 30133076, 24467988, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -25716670, 0, 0, 0, 0, 0, 0, 355190, 0, 400761, 0, -70185], [0, 17993455818, 0, -14121105, 0, -18448235, 3963285, 0, 14121105, 18448235, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -9012760, 0, 0, 0, 0, 0, 0, 962906, 0, -367000, 0, -56700], [-14313377735, 0, 0, 10901914, 0, -10901914, 0, -3492725, -12297957, -23199871, 0, 0, 0, 0, 0, 0], [0, 0, 46932316, 0, 0, 0, 0, 0, 0, 0, 3675476, 0, 401120, 0, -144396, 0], [383039272, -377310640, 0, 1336440, 0, -47358024, 5728632, 5728632, 48694464, -48694464, 0, 0, 0, 0, 0, 0], [0, 0, 53083324, 0, 53083324, 0, 0, 0, 0, 0, 2037304, 2037304, -215518, -215518, -60594, -60594], [14682907630, -14669660060, 0, 22395738, 0, -25595214, 13247570, 13247570, 47990952, -47990952, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -55415828, 0, 0, 0, 0, 0, 0, 3255868, 0, 235445, 0, 208684], [7045107735, 0, 0, 29353489, 0, -29353489, 0, 8982470, 18282448, -11071041, 0, 0, 0, 0, 0, 0], [0, 0, -35553964, 0, -35553964, 0, 0, 0, 0, 0, 716016, 716016, -311722, -311722, 341334, 341334], [0, -5025602395, 0, 37551201, 0, -15314350, 1806630, 0, -37551201, 15314350, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -59137862, 0, 0, 0, 0, 0, 0, 78927, 0, 264015, 0, -214169], [17320313769, -17315679237, 0, -30993270, 0, -39521839, 4634532, 4634532, 8528569, -8528569, 0, 0, 0, 0, 0, 0], [0, 0, 25277830, 0, 25277830, 0, 0, 0, 0, 0, -6457472, -6457472, 1138485, 1138485, -26040, -26040], [-13572213885, 0, 0, 814984, 0, -814984, 0, -21529240, 16511440, 15696456, 0, 0, 0, 0, 0, 0], [0, 0, 40167471, 0, 0, 0, 0, 0, 0, 0, -2339260, 0, -102810, 0, 91532, 0], [0, 0, 75331060, 0, 75331060, 0, 0, 0, 0, 0, 96170, 96170, -503562, -503562, -139730, -139730], [0, 0, 0, 0, 38044062, 0, 0, 0, 0, 0, 0, 3756472, 0, 312691, 0, -65232], [10266327420, 0, 0, 9424193, 0, -9424193, 0, -26213740, 55754301, 46330108, 0, 0, 0, 0, 0, 0], [0, 0, -52670206, 0, -52670206, 0, 0, 0, 0, 0, -2113664, -2113664, -386185, -386185, -289387, -289387], [0, 0, -14523068, 0, 0, 0, 0, 0, 0, 0, 466792, 0, -962136, 0, -238392, 0], [0, 0, 13020474, 0, 0, 0, 0, 0, 0, 0, 482419, 0, -775293, 0, 98651, 0], [0, -10131212422, 0, 14355802, 0, -9333855, 19417664, 0, -14355802, 9333855, 0, 0, 0, 0, 0, 0], [0, 28642536270, 0, 59898845, 0, 41432883, 3085435, 0, -59898845, -41432883, 0, 0, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_252_k_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_252_8_k_e();".
// 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_252_8_k_e(:prec:=16)
    chi := MakeCharacter_252_k();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 8));
    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_252_8_k_e();".
// 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_252_8_k_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_252_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,8,sign)));
    Vf := Kernel([<5,R![2569615197042065586846950781849600000000, 0, 127572248501416319725838528640000000, 0, 4033146385022000401394920800000, 0, 78444034686482596608330000, 0, 1120933539216074343025, 0, 10973506102891850, 0, 79038704955, 0, 352730, 0, 1]>],Snew);
    return Vf;
end function;