from bidict import bidict

anarchy = 16
andean_sling = 516
arbalester = 237
architecture = 51
arquebus = 573
arrowslits = 608
arson = 602
artillery = 10
atheism = 21
atlatl = 460
atonement = 319
aztecs = 543
bagains = 686
ballistics = 93
banking = 17
bearded_axe = 83
berbers = 583
berserkergang = 49
blast_furnace = 75
block_printing = 230
bloodlines = 435
bodkin_arrow = 200
bombard_cannon = 188
bombard_tower = 64
bow_saw = 203
bracer = 201
britons = 529
bulgarians = 673
burmese = 652
byzantines = 535
cannon_galleon = 37
capped_ram = 96
caravan = 48
careening = 374
carrack = 572
cartography = 19
castle_age = 102
cavalier = 209
celts = 541
chain_barding_armor = 82
chain_mail_armor = 76
champion = 264
chatras = 628
chemistry = 47
chinese = 534
chivalry = 493
coinage = 23
conscription = 315
corvinian_army = 514
couriers = 517
crenellations = 11
crop_rotation = 12
crossbowman = 100
chinese_50_percent_hp_demos = 396
cuman_mercenaries = 690
cumans = 675
dark_age = 104
double_crossbow = 623
franks_free_farming_1 = 287
double_bit_axe = 202
drill = 6
druzhina = 513
dry_dock = 375
eagle_warrior = 384
el_dorado = 4
elite_arambai = 619
elite_ballista_elephant = 615
elite_battle_elephant = 631
elite_berserk = 398
elite_boyar = 504
elite_camel_archer = 565
elite_cannon_galleon = 376
elite_caravel = 597
elite_cataphract = 361
elite_chu_ko_nu = 362
elite_conquistador = 60
elite_eagle_warrior = 434
elite_elephant_archer = 481
elite_gbeto = 567
elite_genitour = 599
elite_genoese_crossbowman = 468
elite_huskarl = 365
elite_jaguar_warrior = 432
elite_janissary = 369
elite_kamayuk = 509
elite_karambit_warrior = 617
elite_keshik = 680
elite_kipchak = 682
chieftains = 463
elite_konnik = 678
elite_leitis = 684
elite_longboat = 372
elite_longbowman = 360
elite_magyar_huszar = 472
elite_mameluke = 368
elite_mangudai = 371
elite_organ_gun = 563
elite_plumed_archer = 27
elite_rattan_archer = 621
elite_samurai = 366
elite_shotel_warrior = 569
elite_skirmisher = 98
elite_steppe_lancer = 715
elite_tarkan = 2
elite_teutonic_knight = 364
elite_throwing_axeman = 363
elite_turtle_ship = 448
elite_war_elephant = 367
elite_war_wagon = 450
elite_woad_raider = 370
enable_cows = 557
enable_llamas = 556
enable_sheep = 555
enable_turkeys = 558
ethiopians = 581
faith = 45
farimba = 577
fast_fire_ship = 246
fervor = 252
feudal_age = 101
fire_tower = 527
fletching = 199
forced_levy = 625
forging = 67
fortified_wall = 194
franks = 530
free_cartography = 600
furor_celtica = 5
galleon = 35
garland_wars = 24
bonfire = 65
gold_mining = 55
gold_shaft_mining = 182
goths = 531
great_wall = 462
greek_fire = 464
guard_tower = 140
guilds = 15
halberdier = 429
hand_cannon = 85
hand_cart = 249
heated_shot = 380
heavy_camel_rider = 236
heavy_cav_archer = 218
heavy_demolition_ship = 244
heavy_plow = 13
heavy_scorpion = 239
herbal_medicine = 441
heresy = 439
hill_forts_2 = 394
hill_forts = 691
hoardings = 379
horse_collar = 14
howdah = 626
huns = 545
hunting_dogs = 526
husbandry = 39
hussar = 428
illumination = 233
imperial_age = 103
imperial_camel_rider = 521
imperial_skirmisher = 655
incas = 549
indians = 548
inquisition = 492
iron_casting = 68
ironclad = 489
italians = 547
japanese = 533
kamandaran = 488
kasbah = 578
kataparuto = 59
keep = 63
khmer = 650
koreans = 546
leather_archer_armor = 212
light_cavalry = 254
lithuanians = 676
logistica = 61
long_swordsman = 207
loom = 22
madrasah = 490
maghrabi_camels = 579
magyars = 550
mahouts = 7
malay = 651
malians = 582
man_at_arms = 222
manipur_cavalry = 627
marauders = 483
masonry = 50
mayans = 544
mongols = 540
murder_holes = 322
nomads = 487
obsidian_arrows = 485
onager = 257
orthodoxy = 512
padded_archer_armor = 211
paladin = 265
panokseon = 486
paper_money = 629
parthian_tactics = 436
pavise = 494
perfusion = 457
persians = 536
pikeman = 197
plate_barding_armor = 80
plate_mail_armor = 77
portuguese = 580
recurve_bow = 515
redemption = 316
revetments = 525
ring_archer_armor = 219
rocketry = 52
royal_heirs = 574
sanctity = 231
sappers = 321
saracens = 537
scale_barding_armor = 81
scale_mail_armor = 74
scorpion = 94
set_maximum_population_no_houses = 658
shatagni = 507
shinkichon = 445
shipwright = 373
siege_engineers = 377
siege_onager = 320
siege_ram = 255
silk_armor = 687
silk_road = 499
sipahi = 491
slavs = 551
spanish = 542
spies_and_treason = 408
squires = 215
steppe_husbandry = 689
stirrups = 685
stone_mining = 278
stone_shaft_mining = 279
stronghold = 482
sultans = 506
supplies = 716
supremacy = 440
tatars = 674
teutons = 532
thalassocracy = 624
theocracy = 438
thumb_ring = 437
tigui = 576
timurid_siegecraft = 688
torsion_engines = 575
tower_shields = 692
town_center_spawn = 639
town_patrol = 280
town_watch = 8
tracking = 90
treadmill_crane = 54
turks = 538
tusk_swords = 622
two_handed_swordsman = 217
two_man_saw = 221
vietnamese = 653
vietnamese_vision = 665
vikings = 539
war_galley = 34
warwolf = 461
wheelbarrow = 213
yasama = 484
yeomen = 3
zealotry = 9


tech_names = bidict({
    2: "elite_tarkan",
    3: "yeomen",
    4: "el_dorado",
    5: "furor_celtica",
    6: "drill",
    7: "mahouts",
    8: "town_watch",
    9: "zealotry",
    10: "artillery",
    11: "crenellations",
    12: "crop_rotation",
    13: "heavy_plow",
    14: "horse_collar",
    15: "guilds",
    16: "anarchy",
    17: "banking",
    19: "cartography",
    21: "atheism",
    22: "loom",
    23: "coinage",
    24: "garland_wars",
    27: "elite_plumed_archer",
    34: "war_galley",
    35: "galleon",
    37: "cannon_galleon",
    39: "husbandry",
    45: "faith",
    47: "chemistry",
    48: "caravan",
    49: "berserkergang",
    50: "masonry",
    51: "architecture",
    52: "rocketry",
    54: "treadmill_crane",
    55: "gold_mining",
    59: "kataparuto",
    60: "elite_conquistador",
    61: "logistica",
    63: "keep",
    64: "bombard_tower",
    65: "bonfire",
    67: "forging",
    68: "iron_casting",
    74: "scale_mail_armor",
    75: "blast_furnace",
    76: "chain_mail_armor",
    77: "plate_mail_armor",
    80: "plate_barding_armor",
    81: "scale_barding_armor",
    82: "chain_barding_armor",
    83: "bearded_axe",
    85: "hand_cannon",
    90: "tracking",
    93: "ballistics",
    94: "scorpion",
    96: "capped_ram",
    98: "elite_skirmisher",
    100: "crossbowman",
    101: "feudal_age",
    102: "castle_age",
    103: "imperial_age",
    104: "dark_age",
    140: "guard_tower",
    182: "gold_shaft_mining",
    188: "bombard_cannon",
    194: "fortified_wall",
    197: "pikeman",
    199: "fletching",
    200: "bodkin_arrow",
    201: "bracer",
    202: "double_bit_axe",
    203: "bow_saw",
    207: "long_swordsman",
    209: "cavalier",
    211: "padded_archer_armor",
    212: "leather_archer_armor",
    213: "wheelbarrow",
    215: "squires",
    217: "two_handed_swordsman",
    218: "heavy_cav_archer",
    219: "ring_archer_armor",
    221: "two_man_saw",
    222: "man_at_arms",
    230: "block_printing",
    231: "sanctity",
    233: "illumination",
    236: "heavy_camel_rider",
    237: "arbalester",
    239: "heavy_scorpion",
    244: "heavy_demolition_ship",
    246: "fast_fire_ship",
    249: "hand_cart",
    252: "fervor",
    254: "light_cavalry",
    255: "siege_ram",
    257: "onager",
    264: "champion",
    265: "paladin",
    278: "stone_mining",
    279: "stone_shaft_mining",
    280: "town_patrol",
    287: "franks_free_farming_1",
    315: "conscription",
    316: "redemption",
    319: "atonement",
    320: "siege_onager",
    321: "sappers",
    322: "murder_holes",
    360: "elite_longbowman",
    361: "elite_cataphract",
    362: "elite_chu_ko_nu",
    363: "elite_throwing_axeman",
    364: "elite_teutonic_knight",
    365: "elite_huskarl",
    366: "elite_samurai",
    367: "elite_war_elephant",
    368: "elite_mameluke",
    369: "elite_janissary",
    370: "elite_woad_raider",
    371: "elite_mangudai",
    372: "elite_longboat",
    373: "shipwright",
    374: "careening",
    375: "dry_dock",
    376: "elite_cannon_galleon",
    377: "siege_engineers",
    379: "hoardings",
    380: "heated_shot",
    384: "eagle_warrior",
    394: "hill_forts_2",
    396: "chinese_50_percent_hp_demos",
    398: "elite_berserk",
    408: "spies_and_treason",
    428: "hussar",
    429: "halberdier",
    432: "elite_jaguar_warrior",
    434: "elite_eagle_warrior",
    435: "bloodlines",
    436: "parthian_tactics",
    437: "thumb_ring",
    438: "theocracy",
    439: "heresy",
    440: "supremacy",
    441: "herbal_medicine",
    445: "shinkichon",
    448: "elite_turtle_ship",
    450: "elite_war_wagon",
    457: "perfusion",
    460: "atlatl",
    461: "warwolf",
    462: "great_wall",
    463: "chieftains",
    464: "greek_fire",
    468: "elite_genoese_crossbowman",
    472: "elite_magyar_huszar",
    481: "elite_elephant_archer",
    482: "stronghold",
    483: "marauders",
    484: "yasama",
    485: "obsidian_arrows",
    486: "panokseon",
    487: "nomads",
    488: "kamandaran",
    489: "ironclad",
    490: "madrasah",
    491: "sipahi",
    492: "inquisition",
    493: "chivalry",
    494: "pavise",
    499: "silk_road",
    504: "elite_boyar",
    506: "sultans",
    507: "shatagni",
    509: "elite_kamayuk",
    512: "orthodoxy",
    513: "druzhina",
    514: "corvinian_army",
    515: "recurve_bow",
    516: "andean_sling",
    517: "couriers",
    521: "imperial_camel_rider",
    525: "revetments",
    526: "hunting_dogs",
    527: "fire_tower",
    529: "britons",
    530: "franks",
    531: "goths",
    532: "teutons",
    533: "japanese",
    534: "chinese",
    535: "byzantines",
    536: "persians",
    537: "saracens",
    538: "turks",
    539: "vikings",
    540: "mongols",
    541: "celts",
    542: "spanish",
    543: "aztecs",
    544: "mayans",
    545: "huns",
    546: "koreans",
    547: "italians",
    548: "indians",
    549: "incas",
    550: "magyars",
    551: "slavs",
    555: "enable_sheep",
    556: "enable_llamas",
    557: "enable_cows",
    558: "enable_turkeys",
    563: "elite_organ_gun",
    565: "elite_camel_archer",
    567: "elite_gbeto",
    569: "elite_shotel_warrior",
    572: "carrack",
    573: "arquebus",
    574: "royal_heirs",
    575: "torsion_engines",
    576: "tigui",
    577: "farimba",
    578: "kasbah",
    579: "maghrabi_camels",
    580: "portuguese",
    581: "ethiopians",
    582: "malians",
    583: "berbers",
    597: "elite_caravel",
    599: "elite_genitour",
    600: "free_cartography",
    602: "arson",
    608: "arrowslits",
    615: "elite_ballista_elephant",
    617: "elite_karambit_warrior",
    619: "elite_arambai",
    621: "elite_rattan_archer",
    622: "tusk_swords",
    623: "double_crossbow",
    624: "thalassocracy",
    625: "forced_levy",
    626: "howdah",
    627: "manipur_cavalry",
    628: "chatras",
    629: "paper_money",
    631: "elite_battle_elephant",
    639: "town_center_spawn",
    650: "khmer",
    651: "malay",
    652: "burmese",
    653: "vietnamese",
    655: "imperial_skirmisher",
    658: "set_maximum_population_no_houses",
    665: "vietnamese_vision",
    673: "bulgarians",
    674: "tatars",
    675: "cumans",
    676: "lithuanians",
    678: "elite_konnik",
    680: "elite_keshik",
    682: "elite_kipchak",
    684: "elite_leitis",
    685: "stirrups",
    686: "bagains",
    687: "silk_armor",
    688: "timurid_siegecraft",
    689: "steppe_husbandry",
    690: "cuman_mercenaries",
    691: "hill_forts",
    692: "tower_shields",
    715: "elite_steppe_lancer",
    716: "supplies",
})
