from collections import defaultdict import re KEYWORDS = { "A": [ "anarchism", "animism", "aporia", "archipelagoes", "ascend", "assimilation", "descend", "highlands", "piracy", "water", "zomia" ], "B": [ "buffalo", "buffalo", "buffalo", "buffalo", "agriculture", "barbarian", "bondage", "boundary", "colonialism", "peasant", "royalty", "shadow puppets", "tiger" ], "C": [ "air", "circle", "contagion", "corruption", "cosmology", "leaders", "money", "royalty", "transmission" ], "D": [ "decay", "burial", "dispersal", "disaggregate", "forensics", "human remains", "humidity", "rain", "river", "soil", "tombs" ], "E": [ "evasion", "epidemic", "contagion", "ecology", "efficacy", "transmission" ], "F": [ "fauna", "fiction", "flight", "flora", "fluidity", "forest", "friction", "frontier", "shamans", "outlaw" ], "G": [ "authors", "writing", "cpm/mcp", "espionage", "geography", "ghost", "spirit", "guerillas", "transmission", "gene z hanrahan" ], "H": [ "air-conditioner", "diagram", "heat", "humidity", "hydrology", "irrigation", "landscape", "oppression", "rain", "river", "sweat", "labor", "trade", "water" ], "I": [ "aerial", "agriculture", "authors", "writing", "construction", "identity", "imitation", "inscription", "invulnerability", "irrigation", "tattoo", "illegible", "unreadable" ], "J": [ "jellyfish", "pollution", "shape-shifter", "zomia" ], "K": [ "family", "kinship", "kingship", "modern nepotism", "royalty" ], "L": [ "1900-1947", "authors", "writing", "water bodies", "colonialism", "cpm/mcp", "espionage", "guerillas", "japanese occupation", "legibility", "river", "shape-shifter", "unreadable" ], "M": [ "aerial", "cosmology", "india bce", "magic", "shamans", "mandala", "manpower", "map", "mobility", "network", "survey" ], "N": [ "aerial", "narcotics", "narration", "nationalism", "survey" ], "O": [ "india", "china", "ocean", "opium", "opium war", "orality", "origin" ], "P": [ "balinese painting", "bateson", "buffalo", "colonialism", "deleuze & guattari", "highland tribe", "irrigation", "padi", "peasant", "periphery", "plateau", "politics", "river", "royalty", "swidden agriculture", "tiger" ], "Q": [ "colonialism", "ocean", "queen", "question", "quotation", "royalty", "underwater", "water kingdom", "women", "women with white males" ], "R": [ "gong", "metal", "ritual" ], "S": [ "animism", "cosmology", "emanation of power", "fanaticism", "ghost", "spirit", "mandala", "map", "network", "obedience", "royalty", "sea", "slavery", "society against state", "soul" ], "T": [ "tiger", "tiger", "tiger", "tiger", "tiger", "tiger", "tiger", "tiger", "tiger", "colonialism", "cpm/mcp", "espionage", "forest", "indian convicts", "japanese occupation", "map", "singapore", "slavery", "survey", "theodolite", "water" ], "U": [ "malacca", "ocean", "origin", "royalty", "singapore", "sumatra", "utama", "water kingdom" ], "V": [ "fire", "pontianak", "vagina", "vampire", "voice" ], "W": [ "weretiger", "weretiger", "weretiger", "water", "water", "water bodies", "magic", "shamans", "ritual", "tamil tigers", "tiger", ], "X": [ "becoming-animal", "first contact", "foreigner", "intercourse", "xenophilia/xenophopia", ], "Y": [ "first contact", "foreigner", "magic", "shamans", "obedience", "youth", "yielding" ], "Z": [ "animal", "archipelagoes", "evasion", "forest", "jellyfish", "modern nepotism", "highlands", "oppression", "royalty", "shape-shifter", "water", "weretiger", "zomia", "zoophilia", "zombie" ] }