from collections import defaultdict import re KEYWORDS = { "A": [ "anarchism", "animism", "aporia", "archipelago", "ascending/descending", "assimilation", "diagram", "mountain", "piracy", "water", "zomia" ], "B": [ "agriculture", "barbarian", "bondage", "boundary", "buffalo", "colonialism", "forest", "peasants", "royalty", "shadow puppet", "tiger" ], "C": [ "air", "circle", "contagion", "corruption", "cosmology", "modern leader", "money", "royalty", "transmission" ], "D": [ "burial/grave", "decay", "dispersal", "disaggregation", "forensics", "human remains", "humidity", "rain", "river", "soil" ], "E": [ "evasion", "epidemic", "contagion", "ecology", "efficacy", "transmission of ideology" ], "F": [ "fiction", "flight", "flora", "fauna", "fluidity", "forest", "friction", "frontier", "magic/shamans", "outlaw" ], "G": [ "authors/writing", "cmp", "mpc", "mpaja", "espionage", "geography", "ghost", "spirit", "guerilla", "transmission" ], "H": [ "air conditioner", "diagram", "heat", "humidity", "hydrology", "irrigation", "landscape", "oppression", "rain", "river", "sweat", "labor", "trade", "water" ], "I": [ "aerial shot", "agriculture", "authors/writing", "construction", "identity", "imitation", "inscription", "invulnerability", "irrigation", "tattoo", "unreadable sign" ], "J": [ "jellyfish", "pollution", "shape-shifter", "zomia" ], "K": [ "family", "kinship/kingship", "modern nepotism", "royalty" ], "L": [ "1900-1947", "authors/writing", "body in water", "colonialism", "cmp", "mpc", "mpaja", "espionage", "guerilla", "japanese occupation", "legibility", "river", "shape-shifter", "unreadable sign" ], "M": [ "aerial shot", "cosmology", "india bce", "magic/shamans", "mandala", "manpower", "map", "mobility", "network", "survey" ], "N": [ "aerial shot", "narcotics", "narration", "nationalism", "survey" ], "O": [ "india", "china", "ocean", "opium", "opium war", "orality", "origin" ], "P": [ "balinese painting", "bateson", "buffalo", "colonialism", "deleuze/guattari", "deleuzian diagram", "highland tribe", "irrigation", "padi", "peasants", "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", "state", "soul" ], "T": [ "tiger", "tiger", "tiger", "tiger", "tiger", "tiger", "tiger", "colonialism", "cpm/mcp/mpaja", "espionage", "forest", "indian prisoners", "japanese occupation", "map", "singapore before 1900", "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", "body in water", "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", "archipelago", "evasion", "forest", "jellyfish", "modern nepotism", "mountain", "oppression", "royalty", "shape-shifter", "water", "weretiger", "zomia", "zoophilia", "zombie" ] }