from collections import defaultdict
from PoEQuery.official_api import search_and_fetch_batched
from PoEQuery.official_api_query import OfficialApiQuery

from PoEQuery.stats import uniques

from tqdm import tqdm


def sleep_timer(seconds):
    from time import sleep

    def _sleep_timer():
        for _ in range(seconds):
            sleep(1)
            yield

    for _ in tqdm(_sleep_timer(), total=seconds):
        pass


# sleep_timer(1500)

t = tqdm(uniques)
results = []
edges = defaultdict(list)
for unique in t:
    t.set_description(desc=f"unique - {unique}")
    query = OfficialApiQuery(ultimatum_input=unique)
    results += search_and_fetch_batched([query])[0]

    for result in search_and_fetch_batched([query])[0]:
        in_v = result["item"]["properties"][2]["values"][0][0]
        out_v = result["item"]["properties"][3]["values"][0][0]
        edges[in_v].append(out_v)
    if len(search_and_fetch_batched([query])[0]) == 10:
        print(query)
unique_to_tier = {"Leer Cast": 0}
to_visit = ["Leer Cast"]

while to_visit:
    next_unique = to_visit.pop()
    tier = unique_to_tier[next_unique]
    for out_v in edges[next_unique]:
        if out_v in unique_to_tier:
            assert unique_to_tier[out_v] == tier + 1
        else:
            to_visit.append(out_v)
            unique_to_tier[out_v] = tier + 1

    for in_v in {k for k, v in edges.items() if next_unique in v}:
        if in_v in unique_to_tier:
            assert unique_to_tier[in_v] == tier - 1
        else:
            to_visit.append(in_v)
            unique_to_tier[in_v] = tier - 1
tier_to_unique = defaultdict(list)
for unique, tier in unique_to_tier.items():
    tier_to_unique[tier].append(unique)

tier_to_unique[None] = set(uniques).difference(
    {x for k, v in tier_to_unique.items() for x in v}
)

old_dict = {
    "The Aylardex": "T2",
    "Shaper's Seed": "T3",
    "Extractor Mentis": "T3",
    "The Anvil": "T3",
    "The Jinxed Juju": "T2",
    "Retaliation Charm": "T3",
    "Araku Tiki": "T4",
    "Bisco's Collar": "T1",
    "Perquil's Toe": "T2",
    "Winterheart": "T3",
    "The Ignomon": "T4",
    "Rashkaldor's Patience": "T2",
    "Karui Ward": "T4",
    "Marylene's Fallacy": "T2",
    "Tear of Purity": "T2",
    "Stone of Lazhwar": "T3",
    "Bloodgrip": "T3",
    "Astramentis": "T1",
    "Eye of Chayula": "T2",
    "Carnage Heart": "T2",
    "Atziri's Foible": "T1",
    "Sidhebreath": "T3",
    "Warped Timepiece": "T2",
    "Maligaro's Cruelty": "T2",
    "Ungil's Harmony": "T4",
    "Maligaro's Restraint": "T2",
    "Bated Breath": "T4",
    "Soulthirst": "T2",
    "Soul Tether": "T2",
    "Sunblast": "T3",
    "Perandus Blazon": "T4",
    "Auxium": "T1",
    "Bisco's Leash": "T1",
    "Siegebreaker": "T2",
    "Dyadian Dawn": "T2",
    "Meginord's Girdle": "T3",
    "Belt of the Deceiver": "T3",
    "Headhunter": "THeadHunter",
    "Gluttony": "T2",
    "Immortal Flesh": "T3",
    "Wurm's Molt": "T4",
    "Prismweave": "T3",
    "Ryslatha's Coil": "T0",
    "The Magnate": "T3",
    "Perseverance": "T2",
    "Cospri's Will": "T2",
    "Death's Oath": "T2",
    "Bloodbond": "T2",
    "Ashrend": "T4",
    "The Restless Ward": "T3",
    "Kingsguard": "T4",
    "Solaris Lorica": "T3",
    "Ambu's Charge": "T4",
    "Lioneye's Vision": "T2",
    "Iron Heart": "T2",
    "Bronn's Lithe": "T3",
    "Lightning Coil": "T2",
    "Queen of the Forest": "T2",
    "The Coming Calamity": "T2",
    "Geofri's Sanctuary": "T2",
    "Daresso's Defiance": "T1",
    "Belly of the Beast": "T2",
    "Kaom's Heart": "T1",
    "Greed's Embrace": "T2",
    "Cloak of Defiance": "T1",
    "Victario's Influence": "T2",
    "Icetomb": "T4",
    "Vis Mortis": "T1",
    "Fleshcrafter": "T2",
    "Shavronne's Wrappings": "T1",
    "Lightbane Raiment": "T4",
    "Bramblejack": "T4",
    "Inpulsa's Broken Heart": "T1",
    "Tinkerskin": "T2",
    "Dialla's Malefaction": "T3",
    "Zahndethus' Cassock": "T4",
    "Doryani's Prototype": "T1",
    "Incandescent Heart": "T2",
    "Chains of Command": "T2",
    "Cloak of Flame": "T4",
    "Dendrobate": "T3",
    "Tabula Rasa": "T3",
    "Thousand Ribbons": "T4",
    "The Covenant": "T3",
    "Soul Mantle": "T3",
    "Briskwrap": "T4",
    "Cherrubim's Maleficence": "T2",
    "The Beast Fur Shawl": "T2",
    "Carcass Jack": "T2",
    "Doedre's Skin": "T2",
    "Infernal Mantle": "T4",
    "Foxshade": "T4",
    "Gruthkul's Pelt": "T0",
    "Hyrri's Ire": "T1",
    "Torchoak Step": "T3",
    "Sundance": "T3",
    "Rainbowstride": "T2",
    "Deerstalker": "T4",
    "Darkray Vectors": "T3",
    "Abberath's Hooves": "T0",
    "Victario's Flight": "T4",
    "Dusktoe": "T4",
    "Gang's Momentum": "T3",
    "Wake of Destruction": "T4",
    "Goldwyrm": "T1",
    "Stormcharger": "T4",
    "Windscream": "T2",
    "Ralakesh's Impatience": "T3",
    "Shavronne's Pace": "T4",
    "Three-step Assault": "T4",
    "The Blood Dance": "T2",
    "Bones of Ullr": "T4",
    "Alberon's Warpath": "T3",
    "Skyforth": "T1",
    "Garukhan's Flight": "T0",
    "Sin Trek": "T2",
    "Nomic's Storm": "T4",
    "Kaom's Roots": "T2",
    "Wondertrap": "T4",
    "Wanderlust": "T4",
    "Chin Sol": "T2",
    "Silverbranch": "T4",
    "Iron Commander": "T3",
    "Death's Harp": "T4",
    "Infractem": "T3",
    "Nuro's Harp": "T3",
    "Windripper": "T1",
    "Lioneye's Glare": "T2",
    "Storm Cloud": "T4",
    "Null's Inclination": "T2",
    "Roth's Reach": "T4",
    "Doomfletch": "T4",
    "Quill Rain": "T3",
    "Voltaxic Rift": "T1",
    "Wildslash": "T4",
    "M<NAME>": "T3",
    "Ornament of the East": "T3",
    "Advancing Fortress": "T3",
    "Bloodseeker": "T2",
    "Touch of Anguish": "T2",
    "Last Resort": "T4",
    "Rive": "T2",
    "Cybil's Paw": "T3",
    "The Wasp Nest": "T3",
    "Essentia Sanguis": "T2",
    "Allure": "T2",
    "Coralito's Signature": "T2",
    "Taproot": "T4",
    "Mightflay": "T3",
    "Goredrill": "T4",
    "Bloodplay": "T4",
    "Snakebite": "T3",
    "Giantsbane": "T4",
    "Slitherpinch": "T4",
    "The Embalmer": "T3",
    "Shackles of the Wretched": "T3",
    "Voidbringer": "T2",
    "Repentance": "T2",
    "Worldcarver": "T2",
    "Surgebinders": "T3",
    "Great Old One's Tentacles": "T2",
    "Vixen's Entrapment": "T2",
    "Hrimsorrow": "T4",
    "Empire's Grasp": "T2",
    "Lochtonial Caress": "T3",
    "Triad Grip": "T3",
    "Thunderfist": "T2",
    "Malachai's Mark": "T2",
    "Oskarm": "T2",
    "Kalisa's Grace": "T3",
    "Haemophilia": "T2",
    "Southbound": "T3",
    "Allelopathy": "T2",
    "Meginord's Vise": "T3",
    "Aurseize": "T2",
    "Facebreaker": "T3",
    "Veruso's Battering Rams": "T3",
    "Doryani's Fist": "T1",
    "Doedre's Tenure": "T4",
    "Sadima's Touch": "T3",
    "Ondar's Clasp": "T4",
    "Wyrmsign": "T3",
    "Mindspiral": "T2",
    "Wraithlord": "T4",
    "The Baron": "T2",
    "Heretic's Veil": "T2",
    "Abyssus": "T2",
    "Leer Cast": "T3",
    "Deidbell": "T4",
    "The Three Dragons": "T4",
    "Geofri's Crest": "T4",
    "Veil of the Night": "T3",
    "Crown of Eyes": "T2",
    "Asenath's Mark": "T4",
    "Ezomyte Peak": "T4",
    "Malachai's Simula": "T3",
    "Black Sun Crest": "T2",
    "Goldrim": "T3",
    "Heatshiver": "T4",
    "Doedre's Scorn": "T3",
    "Rime Gaze": "T3",
    "Chitus' Apex": "T2",
    "The Bringer of Rain": "T2",
    "Devoto's Devotion": "T2",
    "Curtain Call": "T3",
    "Voll's Vision": "T2",
    "Ahn's Contempt": "T3",
    "The Brine Crown": "T0",
    "The Broken Crown": "T3",
    "Speaker's Wreath": "T3",
    "Hrimnor's Resolve": "T3",
    "Skullhead": "T4",
    "Starkonja's Head": "T3",
    "Alpha's Howl": "T2",
    "Flamesight": "T1",
    "Thundersight": "T1",
    "Galesight": "T1",
    "Mark of the Red Covenant": "T3",
    "Fairgraves' Tricorne": "T4",
    "Rat's Nest": "T2",
    "Fractal Thoughts": "T2",
    "Crown of Thorns": "T3",
    "The Peregrine": "T4",
    "Kitava's Thirst": "T2",
    "The Writhing Jar": "T2",
    "Divination Distillate": "T2",
    "Unending Hunger": "T1",
    "Grand Spectrum": "T1",
    "Fortress Covenant": "T1",
    "Energy From Within": "T1",
    "Clear Mind": "T1",
    "Healthy Mind": "T1",
    "Dead Reckoning": "T2",
    "Soul's Wick": "T2",
    "From Dust": "T2",
    "Winter's Bounty": "T2",
    "Eldritch Knowledge": "T2",
    "Reckless Defence": "T2",
    "Unstable Payload": "T2",
    "To Dust": "T2",
    "Anatomical Knowledge": "T2",
    "Spirited Response": "T2",
    "Combat Focus": "T2",
    "Brute Force Solution": "T2",
    "Fertile Mind": "T2",
    "Primordial Harmony": "T2",
    "First Snow": "T3",
    "Inevitability": "T3",
    "Frozen Trail": "T3",
    "Rolling Flames": "T3",
    "Malicious Intent": "T3",
    "Hazardous Research": "T3",
    "Spreading Rot": "T3",
    "Grand Spectrum": "T1",
    "Inspired Learning": "T1",
    "Primordial Might": "T1",
    "Efficient Training": "T2",
    "Spire of Stone": "T2",
    "Rain of Splinters": "T2",
    "Martial Artistry": "T2",
    "Mantra of Flames": "T2",
    "Might in All Forms": "T2",
    "The Vigil": "T2",
    "Fireborn": "T2",
    "Combat Focus": "T2",
    "Inertia": "T2",
    "Might of the Meek": "T2",
    "Brawn": "T3",
    "Fragile Bloom": "T3",
    "Weight of the Empire": "T3",
    "Overwhelming Odds": "T3",
    "Rapid Expansion": "T3",
    "Winter Burial": "T3",
    "Coated Shrapnel": "T3",
    "Energised Armour": "T3",
    "Wildfire": "T3",
    "Quickening Covenant": "T1",
    "Lioneye's Fall": "T1",
    "Grand Spectrum": "T1",
    "Intuitive Leap": "T1",
    "Unnatural Instinct": "T1",
    "Pure Talent": "T1",
    "Divide and Conquer": "T2",
    "Steel Spirit": "T2",
    "Hotheaded": "T2",
    "Spirit Guards": "T2",
    "The Golden Rule": "T2",
    "Hidden Potential": "T2",
    "Hair Trigger": "T2",
    "Primordial Eminence": "T2",
    "Static Electricity": "T2",
    "Pugilist": "T2",
    "Cold Steel": "T2",
    "Combat Focus": "T2",
    "Fluid Motion": "T2",
    "Careful Planning": "T2",
    "Omen on the Winds": "T3",
    "Fight for Survival": "T3",
    "Growing Agony": "T3",
    "Volley Fire": "T3",
    "Ring of Blades": "T3",
    "Cheap Construction": "T3",
    "Might and Influence": "T3",
    "Doedre's Elixir": "T3",
    "Maelström of Chaos": "T4",
    "Olmec's Sanctum": "T4",
    "Hallowed Ground": "T3",
    "The Coward's Trial": "T2",
    "Pillars of Arun": "T4",
    "The Putrid Cloister": "T2",
    "Death and Taxes": "T3",
    "Acton's Nightmare": "T4",
    "Hall of Grandmasters": "T3",
    "Mao Kun": "T3",
    "Whakawairua Tuahu": "T4",
    "Poorjoy's Asylum": "T3",
    "Ca<NAME>, Wolfpack's Den": "T3",
    "Oba's Cursed Trove": "T4",
    "Vaults of Atziri": "T4",
    "The Twilight Temple": "T2",
    "Dreadarc": "T4",
    "Relentless Fury": "T4",
    "Dyadus": "T3",
    "The Screaming Eagle": "T4",
    "Soul Taker": "T1",
    "Moonbender's Wing": "T2",
    "Jack, the Axe": "T3",
    "<NAME>": "T3",
    "Flesh-Eater": "T4",
    "Mjölner": "T1",
    "Cameria's Maul": "T4",
    "Frostbreath": "T3",
    "Clayshaper": "T3",
    "Gorebreaker": "T4",
    "Brightbeak": "T2",
    "Ichimonji": "T2",
    "Ephemeral Edge": "T3",
    "Innsbury Edge": "T3",
    "Lakishu's Blade": "T4",
    "Dreamfeather": "T2",
    "Scaeva": "T3",
    "Hyaon's Fury": "T2",
    "Ahn's Might": "T2",
    "Redbeak": "T4",
    "The Princess": "T4",
    "Prismatic Eclipse": "T4",
    "The Tempestuous Steel": "T2",
    "Rearguard": "T2",
    "Scorpion's Call": "T3",
    "Blackgleam": "T4",
    "Drillneck": "T2",
    "Craghead": "T4",
    "Hyrri's Bite": "T4",
    "Soul Strike": "T2",
    "Saemus' Gift": "T2",
    "Asphyxia's Wrath": "T3",
    "Skirmish": "T4",
    "Ming's Heart": "T2",
    "Sibyl's Lament": "T2",
    "Bloodboil": "T4",
    "Kaom's Sign": "T4",
    "Romira's Banquet": "T2",
    "Andvarius": "T2",
    "Ventor's Gamble": "T2",
    "Le Heup of All": "T2",
    "The Warden's Brand": "T2",
    "Blackheart": "T4",
    "Valyrium": "T2",
    "Timeclasp": "T3",
    "Heartbound Loop": "T3",
    "Stormfire": "T2",
    "Doedre's Damning": "T2",
    "Perandus Signet": "T2",
    "Praxis": "T3",
    "Thief's Torment": "T2",
    "Lori's Lantern": "T3",
    "Emberwake": "T2",
    "Mokou's Embrace": "T3",
    "Dream Fragments": "T2",
    "Pyre": "T2",
    "Storm Secret": "T2",
    "Kikazaru": "T3",
    "Call of the Brotherhood": "T1",
    "Essence Worm": "T2",
    "The Hungry Loop": "T2",
    "Profane Proxy": "T2",
    "Malachai's Artifice": "T3",
    "Widowmaker": "T4",
    "Ungil's Gauche": "T4",
    "The Consuming Dark": "T2",
    "Mark of the Doubting Knight": "T3",
    "Cold Iron Point": "T2",
    "Arakaali's Fang": "T0",
    "White Wind": "T3",
    "Heartbreaker": "T3",
    "Bino's Kitchen Knife": "T2",
    "Axiom Perpetuum": "T4",
    "The Supreme Truth": "T2",
    "Nycta's Lantern": "T3",
    "Earendel's Embrace": "T3",
    "Death's Hand": "T2",
    "Balefire": "T2",
    "Singularity": "T2",
    "Bitterdream": "T4",
    "Do<NAME>": "T2",
    "Mon'tregul's Grasp": "T3",
    "Prism Guardian": "T2",
    "Daresso's Courage": "T4",
    "Saffell's Frame": "T2",
    "Sentari's Answer": "T2",
    "<NAME>": "T1",
    "The Eternal Apple": "T3",
    "Ahn's Heritage": "T3",
    "Maligaro's Lens": "T3",
    "Great Old One's Ward": "T2",
    "Tukohama's Fortress": "T0",
    "Chernobog's Pillar": "T3",
    "Atziri's Mirror": "T3",
    "Malachai's Loop": "T2",
    "Kongming's Stratagem": "T3",
    "Light of Lunaris": "T0",
    "Victario's Charity": "T3",
    "Rise of the Phoenix": "T3",
    "Kaltenhalt": "T4",
    "Crest of Perandus": "T3",
    "Lioneye's Remorse": "T2",
    "Springleaf": "T4",
    "Zeel's Amplifier": "T2",
    "Lycosidae": "T1",
    "Titucius' Span": "T2",
    "Wheel of the Stormsail": "T3",
    "Emperor's Vigilance": "T3",
    "The Deep One's Hide": "T4",
    "Jaws of Agony": "T3",
    "Mat<NAME>": "T3",
    "Thousand Teeth Temu": "T4",
    "Chalice of Horrors": "T4",
    "The Blood Thorn": "T3",
    "Fencoil": "T4",
    "Martyr of Innocence": "T0",
    "Agnerod North": "T2",
    "Agnerod East": "T2",
    "Agnerod South": "T2",
    "Agnerod West": "T2",
    "The Searing Touch": "T2",
    "Femurs of the Saints": "T3",
    "The Stormheart": "T3",
    "Ewar's Mirage": "T4",
    "Aurumvorax": "T4",
    "Daresso's Passion": "T4",
    "Fidelitas' Spike": "T3",
    "Cospri's Malice": "T1",
    "The Goddess Bound": "T2",
    "Ngamahu's Flame": "T2",
    "Debeon's Dirge": "T3",
    "Wings of Entropy": "T3",
    "Sinvicta's Mettle": "T3",
    "The Blood Reaper": "T4",
    "Wideswing": "T4",
    "Reaper's Pursuit": "T3",
    "Hezmana's Bloodlust": "T2",
    "Kitava's Feast": "T0",
    "Limbsplit": "T4",
    "Geofri's Baptism": "T4",
    "Voidhome": "T4",
    "Chober Chaber": "T3",
    "Tidebreaker": "T0",
    "Quecholli": "T3",
    "Hrimnor's Hymn": "T4",
    "Kongor's Undying Rage": "T2",
    "Shiversting": "T4",
    "Kondo's Pride": "T3",
    "Rigwald's Charge": "T4",
    "Oro's Sacrifice": "T3",
    "Doomsower": "T1",
    "Queen's Decree": "T4",
    "Hiltless": "T2",
    "The Dancing Dervish": "T3",
    "Terminus Est": "T3",
    "The Wise Oak": "T2",
    "Rumi's Concoction": "T2",
    "Lion's Roar": "T2",
    "Forbidden Taste": "T3",
    "Rotgut": "T3",
    "Taste of Hate": "T1",
    "Kiara's Determination": "T2",
    "Sin's Rebirth": "T0",
    "Witchfire Brew": "T2",
    "The Overflowing Chalice": "T3",
    "The Poet's Pen": "T1",
    "Storm Prison": "T4",
    "Eclipse Solaris": "T3",
    "Obliteration": "T4",
    "Lifesprig": "T4",
    "Midnight Bargain": "T2",
    "Abberath's Horn": "T4",
    "Moonsorrow": "T4",
    "Apep's Rage": "T2",
    "Void Battery": "T1",
    "Ashcaller": "T4",
    "Shade of Solaris": "T0",
    "Twyzel": "T4",
    "Reverberation Rod": "T4",
    "Piscator's Vigil": "T2",
    "Dying Breath": "T3",
    "Realmshaper": "T3",
    "Taryn's Shiver": "T2",
    "Cane of Unravelling": "T3",
    "Pillar of the Caged God": "T3",
    "Hegemony's Era": "T1",
    "Tremor Rod": "T2",
    "Sire of Shards": "T2",
    "The Whispering Ice": "T2",
    "Blood of the Karui": "T3",
    "Berek's Grip": "T3",
    "Berek's Pass": "T3",
    "Berek's Respite": "T1",
    "Lavianga's Spirit": "T3",
    "Daresso's Salute": "??",
    "Gifts from Above": "??",
    "Shavronne's Revelation": "??",
    "Voll's Devotion": "??",
    "Death Rush": "??",
    "Victario's Acuity": "??",
    "The Gull": "??",
    "Vaal Caress": "??",
    "Voideye": "??",
    "Flesh and Spirit": "??",
    "Shadows and Dust": "??",
    "Null and Void": "??",
    "Edge of Madness": "??",
    "The Dark Seer": "??",
    "The Harvest": "??",
    "Brutus' Lead Sprinkler": "??",
    "The Rat Cage": "??",
    "Scold's Bridle": "??",
    "Tasalio's Sign": "??",
    "Ngamahu's Sign": "??",
    "Valako's Sign": "??",
    "Trolltimber Spire": "??",
    "Jorrhast's Blacksteel": "??",
    "Crown of the Pale King": "??",
    "Ylfeban's Trickery": "??",
    "Brinerot Flag": "??",
    "Redblade Banner": "??",
    "Brinerot Whalers": "??",
    "Mutewind Pennant": "??",
    "Mutewind Whispersteps": "??",
    "Brinerot Mark": "??",
    "Mutewind Seal": "??",
    "Redblade Band": "??",
    "The Pariah": "??",
    "Redblade Tramplers": "??",
    "Steppan Eard": "??",
    "Broken Faith": "??",
    "Faminebind": "??",
    "Feastbind": "??",
    "Rigwald's Quills": "??",
    "Rigwald's Savagery": "??",
    "Rigwald's Command": "??",
    "Seven-League Step": "??",
    "The Perandus Manor": "??",
    "Zerphi's Last Breath": "??",
    "Umbilicus Immortalis": "??",
    "Trypanon": "??",
    "Varunastra": "??",
    "Xoph's Inception": "??",
    "The Formless Flame": "??",
    "Xoph's Heart": "??",
    "Tulborn": "??",
    "The Snowblind Grace": "??",
    "The Halcyon": "??",
    "Hand of Thought and Motion": "??",
    "Esh's Mirror": "??",
    "Voice of the Storm": "??",
    "Uul-Netol's Kiss": "??",
    "The Infinite Pursuit": "??",
    "The Anticipation": "??",
    "Severed in Sleep": "??",
    "Skin of the Loyal": "??",
    "The Red Dream": "??",
    "The Green Dream": "??",
    "The Blue Dream": "??",
    "Mark of Submission": "??",
    "The Primordial Chain": "??",
    "Demon Stitcher": "??",
    "Soulwrest": "??",
    "The Grey Spire": "??",
    "March of the Legion": "??",
    "Hyrri's Truth": "??",
    "Maloney's Mechanism": "??",
    "Icefang Orbit": "??",
    "Venopuncture": "??",
    "Rotting Legion": "??",
    "Badge of the Brotherhood": "T1",
    "Machina Mitts": "??",
    "Wreath of Phrecia": "??",
    "Aukuna's Will": "??",
    "Maw of Conquest": "??",
    "Tavukai": "??",
    "Sign of the Sin Eater": "??",
    "Honourhome": "??",
    "Lavianga's Wisdom": "??",
    "Maligaro's Virtuosity": "??",
    "Asenath's Gentle Touch": "??",
    "Al Dhih": "??",
    "Lioneye's Paws": "??",
    "The Sorrow of the Divine": "??",
    "Voll's Protector": "??",
    "<NAME>": "??",
    "Kaom's Primacy": "??",
    "Darkscorn": "??",
    "Rebuke of the Vaal": "??",
    "Divinarius": "??",
    "Pledge of Hands": "??",
    "Rathpith Globe": "??",
    "Endless Misery": "T3",
    "Lord of Steel": "T5",
    "Mercenary's Lot": "T3",
    "Pyroshock Clasp": "T2",
    "The Druggery": "T2",
    "The Ghastly Theatre": "T2",
    "The Highwayman": "T3",
    "Corpsewalker": "T2/T3",
    "Blunderbore": "T1",
}


breakpoint()

from collections import defaultdict
from PoEQuery.official_api import search_and_fetch_batched
from PoEQuery.official_api_query import OfficialApiQuery

from PoEQuery.stats import uniques

from tqdm import tqdm


def sleep_timer(seconds):
    from time import sleep

    def _sleep_timer():
        for _ in range(seconds):
            sleep(1)
            yield

    for _ in tqdm(_sleep_timer(), total=seconds):
        pass


# sleep_timer(1500)

t = tqdm(uniques)
results = []
edges = defaultdict(list)
for unique in t:
    t.set_description(desc=f"unique - {unique}")
    query = OfficialApiQuery(ultimatum_input=unique)
    results += search_and_fetch_batched([query])[0]

    for result in search_and_fetch_batched([query])[0]:
        in_v = result["item"]["properties"][2]["values"][0][0]
        out_v = result["item"]["properties"][3]["values"][0][0]
        edges[in_v].append(out_v)
    if len(search_and_fetch_batched([query])[0]) == 10:
        print(query)
unique_to_tier = {"Leer Cast": 0}
to_visit = ["Leer Cast"]

while to_visit:
    next_unique = to_visit.pop()
    tier = unique_to_tier[next_unique]
    for out_v in edges[next_unique]:
        if out_v in unique_to_tier:
            assert unique_to_tier[out_v] == tier + 1
        else:
            to_visit.append(out_v)
            unique_to_tier[out_v] = tier + 1

    for in_v in {k for k, v in edges.items() if next_unique in v}:
        if in_v in unique_to_tier:
            assert unique_to_tier[in_v] == tier - 1
        else:
            to_visit.append(in_v)
            unique_to_tier[in_v] = tier - 1
tier_to_unique = defaultdict(list)
for unique, tier in unique_to_tier.items():
    tier_to_unique[tier].append(unique)

tier_to_unique[None] = set(uniques).difference(
    {x for k, v in tier_to_unique.items() for x in v}
)

old_dict = {
    "The Aylardex": "T2",
    "Shaper's Seed": "T3",
    "Extractor Mentis": "T3",
    "The Anvil": "T3",
    "The Jinxed Juju": "T2",
    "Retaliation Charm": "T3",
    "Araku Tiki": "T4",
    "Bisco's Collar": "T1",
    "Perquil's Toe": "T2",
    "Winterheart": "T3",
    "The Ignomon": "T4",
    "Rashkaldor's Patience": "T2",
    "Karui Ward": "T4",
    "Marylene's Fallacy": "T2",
    "Tear of Purity": "T2",
    "Stone of Lazhwar": "T3",
    "Bloodgrip": "T3",
    "Astramentis": "T1",
    "Eye of Chayula": "T2",
    "Carnage Heart": "T2",
    "Atziri's Foible": "T1",
    "Sidhebreath": "T3",
    "Warped Timepiece": "T2",
    "Maligaro's Cruelty": "T2",
    "Ungil's Harmony": "T4",
    "Maligaro's Restraint": "T2",
    "Bated Breath": "T4",
    "Soulthirst": "T2",
    "Soul Tether": "T2",
    "Sunblast": "T3",
    "Perandus Blazon": "T4",
    "Auxium": "T1",
    "Bisco's Leash": "T1",
    "Siegebreaker": "T2",
    "Dyadian Dawn": "T2",
    "Meginord's Girdle": "T3",
    "Belt of the Deceiver": "T3",
    "Headhunter": "THeadHunter",
    "Gluttony": "T2",
    "Immortal Flesh": "T3",
    "Wurm's Molt": "T4",
    "Prismweave": "T3",
    "Ryslatha's Coil": "T0",
    "The Magnate": "T3",
    "Perseverance": "T2",
    "Cospri's Will": "T2",
    "Death's Oath": "T2",
    "Bloodbond": "T2",
    "Ashrend": "T4",
    "The Restless Ward": "T3",
    "Kingsguard": "T4",
    "Solaris Lorica": "T3",
    "Ambu's Charge": "T4",
    "Lioneye's Vision": "T2",
    "Iron Heart": "T2",
    "Bronn's Lithe": "T3",
    "Lightning Coil": "T2",
    "Queen of the Forest": "T2",
    "The Coming Calamity": "T2",
    "Geofri's Sanctuary": "T2",
    "Daresso's Defiance": "T1",
    "Belly of the Beast": "T2",
    "Kaom's Heart": "T1",
    "Greed's Embrace": "T2",
    "Cloak of Defiance": "T1",
    "Victario's Influence": "T2",
    "Icetomb": "T4",
    "Vis Mortis": "T1",
    "Fleshcrafter": "T2",
    "Shavronne's Wrappings": "T1",
    "Lightbane Raiment": "T4",
    "Bramblejack": "T4",
    "Inpulsa's Broken Heart": "T1",
    "Tinkerskin": "T2",
    "Dialla's Malefaction": "T3",
    "Zahndethus' Cassock": "T4",
    "Doryani's Prototype": "T1",
    "Incandescent Heart": "T2",
    "Chains of Command": "T2",
    "Cloak of Flame": "T4",
    "Dendrobate": "T3",
    "Tabula Rasa": "T3",
    "Thousand Ribbons": "T4",
    "The Covenant": "T3",
    "Soul Mantle": "T3",
    "Briskwrap": "T4",
    "Cherrubim's Maleficence": "T2",
    "The Beast Fur Shawl": "T2",
    "Carcass Jack": "T2",
    "Doedre's Skin": "T2",
    "Infernal Mantle": "T4",
    "Foxshade": "T4",
    "Gruthkul's Pelt": "T0",
    "Hyrri's Ire": "T1",
    "Torchoak Step": "T3",
    "Sundance": "T3",
    "Rainbowstride": "T2",
    "Deerstalker": "T4",
    "Darkray Vectors": "T3",
    "Abberath's Hooves": "T0",
    "Victario's Flight": "T4",
    "Dusktoe": "T4",
    "Gang's Momentum": "T3",
    "Wake of Destruction": "T4",
    "Goldwyrm": "T1",
    "Stormcharger": "T4",
    "Windscream": "T2",
    "Ralakesh's Impatience": "T3",
    "Shavronne's Pace": "T4",
    "Three-step Assault": "T4",
    "The Blood Dance": "T2",
    "Bones of Ullr": "T4",
    "Alberon's Warpath": "T3",
    "Skyforth": "T1",
    "Garukhan's Flight": "T0",
    "Sin Trek": "T2",
    "Nomic's Storm": "T4",
    "Kaom's Roots": "T2",
    "Wondertrap": "T4",
    "Wanderlust": "T4",
    "Chin Sol": "T2",
    "Silverbranch": "T4",
    "Iron Commander": "T3",
    "Death's Harp": "T4",
    "Infractem": "T3",
    "Nuro's Harp": "T3",
    "Windripper": "T1",
    "Lioneye's Glare": "T2",
    "Storm Cloud": "T4",
    "Null's Inclination": "T2",
    "Roth's Reach": "T4",
    "Doomfletch": "T4",
    "Quill Rain": "T3",
    "Voltaxic Rift": "T1",
    "Wildslash": "T4",
    "M<NAME>": "T3",
    "Ornament of the East": "T3",
    "Advancing Fortress": "T3",
    "Bloodseeker": "T2",
    "Touch of Anguish": "T2",
    "Last Resort": "T4",
    "Rive": "T2",
    "Cybil's Paw": "T3",
    "The Wasp Nest": "T3",
    "Essentia Sanguis": "T2",
    "Allure": "T2",
    "Coralito's Signature": "T2",
    "Taproot": "T4",
    "Mightflay": "T3",
    "Goredrill": "T4",
    "Bloodplay": "T4",
    "Snakebite": "T3",
    "Giantsbane": "T4",
    "Slitherpinch": "T4",
    "The Embalmer": "T3",
    "Shackles of the Wretched": "T3",
    "Voidbringer": "T2",
    "Repentance": "T2",
    "Worldcarver": "T2",
    "Surgebinders": "T3",
    "Great Old One's Tentacles": "T2",
    "Vixen's Entrapment": "T2",
    "Hrimsorrow": "T4",
    "Empire's Grasp": "T2",
    "Lochtonial Caress": "T3",
    "Triad Grip": "T3",
    "Thunderfist": "T2",
    "Malachai's Mark": "T2",
    "Oskarm": "T2",
    "Kalisa's Grace": "T3",
    "Haemophilia": "T2",
    "Southbound": "T3",
    "Allelopathy": "T2",
    "Meginord's Vise": "T3",
    "Aurseize": "T2",
    "Facebreaker": "T3",
    "Veruso's Battering Rams": "T3",
    "Doryani's Fist": "T1",
    "Doedre's Tenure": "T4",
    "Sadima's Touch": "T3",
    "Ondar's Clasp": "T4",
    "Wyrmsign": "T3",
    "Mindspiral": "T2",
    "Wraithlord": "T4",
    "The Baron": "T2",
    "Heretic's Veil": "T2",
    "Abyssus": "T2",
    "Leer Cast": "T3",
    "Deidbell": "T4",
    "The Three Dragons": "T4",
    "Geofri's Crest": "T4",
    "Veil of the Night": "T3",
    "Crown of Eyes": "T2",
    "Asenath's Mark": "T4",
    "Ezomyte Peak": "T4",
    "Malachai's Simula": "T3",
    "Black Sun Crest": "T2",
    "Goldrim": "T3",
    "Heatshiver": "T4",
    "Doedre's Scorn": "T3",
    "Rime Gaze": "T3",
    "Chitus' Apex": "T2",
    "The Bringer of Rain": "T2",
    "Devoto's Devotion": "T2",
    "Curtain Call": "T3",
    "Voll's Vision": "T2",
    "Ahn's Contempt": "T3",
    "The Brine Crown": "T0",
    "The Broken Crown": "T3",
    "Speaker's Wreath": "T3",
    "Hrimnor's Resolve": "T3",
    "Skullhead": "T4",
    "Starkonja's Head": "T3",
    "Alpha's Howl": "T2",
    "Flamesight": "T1",
    "Thundersight": "T1",
    "Galesight": "T1",
    "Mark of the Red Covenant": "T3",
    "Fairgraves' Tricorne": "T4",
    "Rat's Nest": "T2",
    "Fractal Thoughts": "T2",
    "Crown of Thorns": "T3",
    "The Peregrine": "T4",
    "Kitava's Thirst": "T2",
    "The Writhing Jar": "T2",
    "Divination Distillate": "T2",
    "Unending Hunger": "T1",
    "Grand Spectrum": "T1",
    "Fortress Covenant": "T1",
    "Energy From Within": "T1",
    "Clear Mind": "T1",
    "Healthy Mind": "T1",
    "Dead Reckoning": "T2",
    "Soul's Wick": "T2",
    "From Dust": "T2",
    "Winter's Bounty": "T2",
    "Eldritch Knowledge": "T2",
    "Reckless Defence": "T2",
    "Unstable Payload": "T2",
    "To Dust": "T2",
    "Anatomical Knowledge": "T2",
    "Spirited Response": "T2",
    "Combat Focus": "T2",
    "Brute Force Solution": "T2",
    "Fertile Mind": "T2",
    "Primordial Harmony": "T2",
    "First Snow": "T3",
    "Inevitability": "T3",
    "Frozen Trail": "T3",
    "Rolling Flames": "T3",
    "Malicious Intent": "T3",
    "Hazardous Research": "T3",
    "Spreading Rot": "T3",
    "Grand Spectrum": "T1",
    "Inspired Learning": "T1",
    "Primordial Might": "T1",
    "Efficient Training": "T2",
    "Spire of Stone": "T2",
    "Rain of Splinters": "T2",
    "Martial Artistry": "T2",
    "Mantra of Flames": "T2",
    "Might in All Forms": "T2",
    "The Vigil": "T2",
    "Fireborn": "T2",
    "Combat Focus": "T2",
    "Inertia": "T2",
    "Might of the Meek": "T2",
    "Brawn": "T3",
    "Fragile Bloom": "T3",
    "Weight of the Empire": "T3",
    "Overwhelming Odds": "T3",
    "Rapid Expansion": "T3",
    "Winter Burial": "T3",
    "Coated Shrapnel": "T3",
    "Energised Armour": "T3",
    "Wildfire": "T3",
    "Quickening Covenant": "T1",
    "Lioneye's Fall": "T1",
    "Grand Spectrum": "T1",
    "Intuitive Leap": "T1",
    "Unnatural Instinct": "T1",
    "Pure Talent": "T1",
    "Divide and Conquer": "T2",
    "Steel Spirit": "T2",
    "Hotheaded": "T2",
    "Spirit Guards": "T2",
    "The Golden Rule": "T2",
    "Hidden Potential": "T2",
    "Hair Trigger": "T2",
    "Primordial Eminence": "T2",
    "Static Electricity": "T2",
    "Pugilist": "T2",
    "Cold Steel": "T2",
    "Combat Focus": "T2",
    "Fluid Motion": "T2",
    "Careful Planning": "T2",
    "Omen on the Winds": "T3",
    "Fight for Survival": "T3",
    "Growing Agony": "T3",
    "Volley Fire": "T3",
    "Ring of Blades": "T3",
    "Cheap Construction": "T3",
    "Might and Influence": "T3",
    "Doedre's Elixir": "T3",
    "Maelström of Chaos": "T4",
    "Olmec's Sanctum": "T4",
    "Hallowed Ground": "T3",
    "The Coward's Trial": "T2",
    "Pillars of Arun": "T4",
    "The Putrid Cloister": "T2",
    "Death and Taxes": "T3",
    "Acton's Nightmare": "T4",
    "Hall of Grandmasters": "T3",
    "Mao Kun": "T3",
    "Whakawairua Tuahu": "T4",
    "Poorjoy's Asylum": "T3",
    "Ca<NAME>, Wolfpack's Den": "T3",
    "Oba's Cursed Trove": "T4",
    "Vaults of Atziri": "T4",
    "The Twilight Temple": "T2",
    "Dreadarc": "T4",
    "Relentless Fury": "T4",
    "Dyadus": "T3",
    "The Screaming Eagle": "T4",
    "Soul Taker": "T1",
    "Moonbender's Wing": "T2",
    "Jack, the Axe": "T3",
    "<NAME>": "T3",
    "Flesh-Eater": "T4",
    "Mjölner": "T1",
    "Cameria's Maul": "T4",
    "Frostbreath": "T3",
    "Clayshaper": "T3",
    "Gorebreaker": "T4",
    "Brightbeak": "T2",
    "Ichimonji": "T2",
    "Ephemeral Edge": "T3",
    "Innsbury Edge": "T3",
    "Lakishu's Blade": "T4",
    "Dreamfeather": "T2",
    "Scaeva": "T3",
    "Hyaon's Fury": "T2",
    "Ahn's Might": "T2",
    "Redbeak": "T4",
    "The Princess": "T4",
    "Prismatic Eclipse": "T4",
    "The Tempestuous Steel": "T2",
    "Rearguard": "T2",
    "Scorpion's Call": "T3",
    "Blackgleam": "T4",
    "Drillneck": "T2",
    "Craghead": "T4",
    "Hyrri's Bite": "T4",
    "Soul Strike": "T2",
    "Saemus' Gift": "T2",
    "Asphyxia's Wrath": "T3",
    "Skirmish": "T4",
    "Ming's Heart": "T2",
    "Sibyl's Lament": "T2",
    "Bloodboil": "T4",
    "Kaom's Sign": "T4",
    "Romira's Banquet": "T2",
    "Andvarius": "T2",
    "Ventor's Gamble": "T2",
    "Le Heup of All": "T2",
    "The Warden's Brand": "T2",
    "Blackheart": "T4",
    "Valyrium": "T2",
    "Timeclasp": "T3",
    "Heartbound Loop": "T3",
    "Stormfire": "T2",
    "Doedre's Damning": "T2",
    "Perandus Signet": "T2",
    "Praxis": "T3",
    "Thief's Torment": "T2",
    "Lori's Lantern": "T3",
    "Emberwake": "T2",
    "Mokou's Embrace": "T3",
    "Dream Fragments": "T2",
    "Pyre": "T2",
    "Storm Secret": "T2",
    "Kikazaru": "T3",
    "Call of the Brotherhood": "T1",
    "Essence Worm": "T2",
    "The Hungry Loop": "T2",
    "Profane Proxy": "T2",
    "Malachai's Artifice": "T3",
    "Widowmaker": "T4",
    "Ungil's Gauche": "T4",
    "The Consuming Dark": "T2",
    "Mark of the Doubting Knight": "T3",
    "Cold Iron Point": "T2",
    "Arakaali's Fang": "T0",
    "White Wind": "T3",
    "Heartbreaker": "T3",
    "Bino's Kitchen Knife": "T2",
    "Axiom Perpetuum": "T4",
    "The Supreme Truth": "T2",
    "Nycta's Lantern": "T3",
    "Earendel's Embrace": "T3",
    "Death's Hand": "T2",
    "Balefire": "T2",
    "Singularity": "T2",
    "Bitterdream": "T4",
    "Do<NAME>": "T2",
    "Mon'tregul's Grasp": "T3",
    "Prism Guardian": "T2",
    "Daresso's Courage": "T4",
    "Saffell's Frame": "T2",
    "Sentari's Answer": "T2",
    "<NAME>": "T1",
    "The Eternal Apple": "T3",
    "Ahn's Heritage": "T3",
    "Maligaro's Lens": "T3",
    "Great Old One's Ward": "T2",
    "Tukohama's Fortress": "T0",
    "Chernobog's Pillar": "T3",
    "Atziri's Mirror": "T3",
    "Malachai's Loop": "T2",
    "Kongming's Stratagem": "T3",
    "Light of Lunaris": "T0",
    "Victario's Charity": "T3",
    "Rise of the Phoenix": "T3",
    "Kaltenhalt": "T4",
    "Crest of Perandus": "T3",
    "Lioneye's Remorse": "T2",
    "Springleaf": "T4",
    "Zeel's Amplifier": "T2",
    "Lycosidae": "T1",
    "Titucius' Span": "T2",
    "Wheel of the Stormsail": "T3",
    "Emperor's Vigilance": "T3",
    "The Deep One's Hide": "T4",
    "Jaws of Agony": "T3",
    "Mat<NAME>": "T3",
    "Thousand Teeth Temu": "T4",
    "Chalice of Horrors": "T4",
    "The Blood Thorn": "T3",
    "Fencoil": "T4",
    "Martyr of Innocence": "T0",
    "Agnerod North": "T2",
    "Agnerod East": "T2",
    "Agnerod South": "T2",
    "Agnerod West": "T2",
    "The Searing Touch": "T2",
    "Femurs of the Saints": "T3",
    "The Stormheart": "T3",
    "Ewar's Mirage": "T4",
    "Aurumvorax": "T4",
    "Daresso's Passion": "T4",
    "Fidelitas' Spike": "T3",
    "Cospri's Malice": "T1",
    "The Goddess Bound": "T2",
    "Ngamahu's Flame": "T2",
    "Debeon's Dirge": "T3",
    "Wings of Entropy": "T3",
    "Sinvicta's Mettle": "T3",
    "The Blood Reaper": "T4",
    "Wideswing": "T4",
    "Reaper's Pursuit": "T3",
    "Hezmana's Bloodlust": "T2",
    "Kitava's Feast": "T0",
    "Limbsplit": "T4",
    "Geofri's Baptism": "T4",
    "Voidhome": "T4",
    "Chober Chaber": "T3",
    "Tidebreaker": "T0",
    "Quecholli": "T3",
    "Hrimnor's Hymn": "T4",
    "Kongor's Undying Rage": "T2",
    "Shiversting": "T4",
    "Kondo's Pride": "T3",
    "Rigwald's Charge": "T4",
    "Oro's Sacrifice": "T3",
    "Doomsower": "T1",
    "Queen's Decree": "T4",
    "Hiltless": "T2",
    "The Dancing Dervish": "T3",
    "Terminus Est": "T3",
    "The Wise Oak": "T2",
    "Rumi's Concoction": "T2",
    "Lion's Roar": "T2",
    "Forbidden Taste": "T3",
    "Rotgut": "T3",
    "Taste of Hate": "T1",
    "Kiara's Determination": "T2",
    "Sin's Rebirth": "T0",
    "Witchfire Brew": "T2",
    "The Overflowing Chalice": "T3",
    "The Poet's Pen": "T1",
    "Storm Prison": "T4",
    "Eclipse Solaris": "T3",
    "Obliteration": "T4",
    "Lifesprig": "T4",
    "Midnight Bargain": "T2",
    "Abberath's Horn": "T4",
    "Moonsorrow": "T4",
    "Apep's Rage": "T2",
    "Void Battery": "T1",
    "Ashcaller": "T4",
    "Shade of Solaris": "T0",
    "Twyzel": "T4",
    "Reverberation Rod": "T4",
    "Piscator's Vigil": "T2",
    "Dying Breath": "T3",
    "Realmshaper": "T3",
    "Taryn's Shiver": "T2",
    "Cane of Unravelling": "T3",
    "Pillar of the Caged God": "T3",
    "Hegemony's Era": "T1",
    "Tremor Rod": "T2",
    "Sire of Shards": "T2",
    "The Whispering Ice": "T2",
    "Blood of the Karui": "T3",
    "Berek's Grip": "T3",
    "Berek's Pass": "T3",
    "Berek's Respite": "T1",
    "Lavianga's Spirit": "T3",
    "Daresso's Salute": "??",
    "Gifts from Above": "??",
    "Shavronne's Revelation": "??",
    "Voll's Devotion": "??",
    "Death Rush": "??",
    "Victario's Acuity": "??",
    "The Gull": "??",
    "Vaal Caress": "??",
    "Voideye": "??",
    "Flesh and Spirit": "??",
    "Shadows and Dust": "??",
    "Null and Void": "??",
    "Edge of Madness": "??",
    "The Dark Seer": "??",
    "The Harvest": "??",
    "Brutus' Lead Sprinkler": "??",
    "The Rat Cage": "??",
    "Scold's Bridle": "??",
    "Tasalio's Sign": "??",
    "Ngamahu's Sign": "??",
    "Valako's Sign": "??",
    "Trolltimber Spire": "??",
    "Jorrhast's Blacksteel": "??",
    "Crown of the Pale King": "??",
    "Ylfeban's Trickery": "??",
    "Brinerot Flag": "??",
    "Redblade Banner": "??",
    "Brinerot Whalers": "??",
    "Mutewind Pennant": "??",
    "Mutewind Whispersteps": "??",
    "Brinerot Mark": "??",
    "Mutewind Seal": "??",
    "Redblade Band": "??",
    "The Pariah": "??",
    "Redblade Tramplers": "??",
    "Steppan Eard": "??",
    "Broken Faith": "??",
    "Faminebind": "??",
    "Feastbind": "??",
    "Rigwald's Quills": "??",
    "Rigwald's Savagery": "??",
    "Rigwald's Command": "??",
    "Seven-League Step": "??",
    "The Perandus Manor": "??",
    "Zerphi's Last Breath": "??",
    "Umbilicus Immortalis": "??",
    "Trypanon": "??",
    "Varunastra": "??",
    "Xoph's Inception": "??",
    "The Formless Flame": "??",
    "Xoph's Heart": "??",
    "Tulborn": "??",
    "The Snowblind Grace": "??",
    "The Halcyon": "??",
    "Hand of Thought and Motion": "??",
    "Esh's Mirror": "??",
    "Voice of the Storm": "??",
    "Uul-Netol's Kiss": "??",
    "The Infinite Pursuit": "??",
    "The Anticipation": "??",
    "Severed in Sleep": "??",
    "Skin of the Loyal": "??",
    "The Red Dream": "??",
    "The Green Dream": "??",
    "The Blue Dream": "??",
    "Mark of Submission": "??",
    "The Primordial Chain": "??",
    "Demon Stitcher": "??",
    "Soulwrest": "??",
    "The Grey Spire": "??",
    "March of the Legion": "??",
    "Hyrri's Truth": "??",
    "Maloney's Mechanism": "??",
    "Icefang Orbit": "??",
    "Venopuncture": "??",
    "Rotting Legion": "??",
    "Badge of the Brotherhood": "T1",
    "Machina Mitts": "??",
    "Wreath of Phrecia": "??",
    "Aukuna's Will": "??",
    "Maw of Conquest": "??",
    "Tavukai": "??",
    "Sign of the Sin Eater": "??",
    "Honourhome": "??",
    "Lavianga's Wisdom": "??",
    "Maligaro's Virtuosity": "??",
    "Asenath's Gentle Touch": "??",
    "Al Dhih": "??",
    "Lioneye's Paws": "??",
    "The Sorrow of the Divine": "??",
    "Voll's Protector": "??",
    "<NAME>": "??",
    "Kaom's Primacy": "??",
    "Darkscorn": "??",
    "Rebuke of the Vaal": "??",
    "Divinarius": "??",
    "Pledge of Hands": "??",
    "Rathpith Globe": "??",
    "Endless Misery": "T3",
    "Lord of Steel": "T5",
    "Mercenary's Lot": "T3",
    "Pyroshock Clasp": "T2",
    "The Druggery": "T2",
    "The Ghastly Theatre": "T2",
    "The Highwayman": "T3",
    "Corpsewalker": "T2/T3",
    "Blunderbore": "T1",
}


breakpoint()

# sleep_timer(1500)