# -*- Mode: Python -*-

"""encode/decode a bitcoin address as a sequence of common english words.
This could be very useful for entering address into devices with touch-screen keyboards,
 or for quickly transferring addresses via voice.
"""

# wordfrequency.info
# from the 5000, removed capitalized words, duplicates(!), and the shorter words to get exactly 4096.

words = [
    'abandon', 'ability', 'able', 'abortion', 'about', 'above', 'abroad', 'absence', 'absolute', 'absolutely',
    'absorb', 'abstract', 'abuse', 'academic', 'accelerate', 'accent', 'accept', 'acceptable', 'acceptance',
    'access', 'accessible', 'accident', 'accommodate', 'accompany', 'accomplish', 'accomplishment', 'according',
    'account', 'accountability', 'accounting', 'accuracy', 'accurate', 'accurately', 'accusation', 'accuse',
    'achieve', 'achievement', 'acid', 'acknowledge', 'acquire', 'acquisition', 'across', 'action', 'active',
    'actively', 'activist', 'activity', 'actor', 'actress', 'actual', 'actually', 'adapt', 'add', 'added',
    'addition', 'additional', 'address', 'adequate', 'adjust', 'adjustment', 'administer', 'administration',
    'administrative', 'administrator', 'admire', 'admission', 'admit', 'adolescent', 'adopt', 'adoption', 'adult',
    'advance', 'advanced', 'advantage', 'adventure', 'advertising', 'advice', 'advise', 'adviser', 'advocate',
    'aesthetic', 'affair', 'affect', 'afford', 'afraid', 'after', 'afternoon', 'afterward', 'again', 'against',
    'age', 'agency', 'agenda', 'agent', 'aggression', 'aggressive', 'ago', 'agree', 'agreement', 'agricultural',
    'agriculture', 'ahead', 'aide', 'aircraft', 'airline', 'airplane', 'airport', 'aisle', 'alarm', 'album',
    'alcohol', 'alien', 'alike', 'alive', 'allegation', 'alleged', 'allegedly', 'alley', 'alliance', 'allow',
    'ally', 'almost', 'alone', 'along', 'alongside', 'already', 'also', 'alter', 'alternative', 'although',
    'altogether', 'aluminum', 'always', 'amazing', 'ambassador', 'ambition', 'ambitious', 'amendment', 'amid',
    'among', 'amount', 'analysis', 'analyst', 'analyze', 'ancestor', 'ancient', 'and/or', 'angel', 'anger', 'angle',
    'angry', 'animal', 'ankle', 'anniversary', 'announce', 'announcement', 'annual', 'annually', 'anonymous',
    'another', 'answer', 'anticipate', 'anxiety', 'anxious', 'anybody', 'anymore', 'anyone', 'anything', 'anyway',
    'anywhere', 'apart', 'apartment', 'apologize', 'apology', 'apparent', 'apparently', 'appeal', 'appear',
    'appearance', 'apple', 'application', 'apply', 'appoint', 'appointment', 'appreciate', 'appreciation',
    'approach', 'appropriate', 'approval', 'approve', 'approximately', 'architect', 'architecture', 'area', 'arena',
    'argue', 'argument', 'arise', 'armed', 'army', 'around', 'arrange', 'arrangement', 'array', 'arrest', 'arrival',
    'arrive', 'arrow', 'article', 'articulate', 'artifact', 'artificial', 'artist', 'artistic', 'aside', 'asleep',
    'aspect', 'assault', 'assemble', 'assembly', 'assert', 'assess', 'assessment', 'asset', 'assign', 'assignment',
    'assist', 'assistance', 'assistant', 'associate', 'associated', 'association', 'assume', 'assumption', 'assure',
    'astronomer', 'athlete', 'athletic', 'atmosphere', 'atop', 'attach', 'attack', 'attempt', 'attend',
    'attendance', 'attention', 'attitude', 'attorney', 'attract', 'attraction', 'attractive', 'attribute',
    'auction', 'audience', 'aunt', 'author', 'authority', 'authorize', 'auto', 'automatic', 'automatically',
    'automobile', 'autonomy', 'availability', 'available', 'average', 'avoid', 'await', 'awake', 'award', 'aware',
    'awareness', 'away', 'awful', 'baby', 'back', 'background', 'backyard', 'bacteria', 'badly', 'bake', 'balance',
    'balanced', 'ball', 'balloon', 'ballot', 'banana', 'band', 'bank', 'banker', 'banking', 'bare', 'barely',
    'barn', 'barrel', 'barrier', 'base', 'baseball', 'basement', 'basic', 'basically', 'basis', 'basket',
    'basketball', 'bat', 'bath', 'bathroom', 'battery', 'battle', 'bay', 'beach', 'beam', 'bean', 'bear', 'beard',
    'beast', 'beat', 'beautiful', 'beauty', 'because', 'become', 'bed', 'bedroom', 'bee', 'beef', 'beer', 'before',
    'beg', 'begin', 'beginning', 'behalf', 'behave', 'behavior', 'behavioral', 'behind', 'being', 'belief',
    'believe', 'bell', 'belly', 'belong', 'below', 'belt', 'bench', 'bend', 'beneath', 'benefit', 'beside',
    'besides', 'best', 'bet', 'better', 'between', 'beyond', 'bias', 'bicycle', 'bike', 'bill', 'billion', 'bind',
    'biography', 'biological', 'biology', 'bird', 'birth', 'birthday', 'bishop', 'bite', 'bitter', 'black', 'blade',
    'blame', 'blank', 'blanket', 'blast', 'blend', 'bless', 'blessing', 'blind', 'blink', 'block', 'blond', 'blood',
    'bloody', 'blow', 'blue', 'board', 'boast', 'boat', 'body', 'boil', 'bold', 'bolt', 'bomb', 'bombing', 'bond',
    'bone', 'bonus', 'book', 'boom', 'boost', 'boot', 'booth', 'border', 'boring', 'born', 'borrow', 'boss', 'both',
    'bother', 'bottle', 'bottom', 'bounce', 'boundary', 'bowl', 'boyfriend', 'brain', 'brake', 'branch', 'brand',
    'brave', 'bread', 'break', 'breakfast', 'breast', 'breath', 'breathe', 'breathing', 'breeze', 'brick', 'bride',
    'bridge', 'brief', 'briefly', 'bright', 'brilliant', 'bring', 'broad', 'broadcast', 'broken', 'broker',
    'bronze', 'brother', 'brown', 'brush', 'brutal', 'bubble', 'buck', 'bucket', 'buddy', 'budget', 'bug', 'build',
    'builder', 'building', 'bulb', 'bulk', 'bull', 'bullet', 'bunch', 'burden', 'bureau', 'burn', 'burning',
    'burst', 'bury', 'bus', 'bush', 'business', 'businessman', 'busy', 'but', 'butt', 'butter', 'butterfly',
    'button', 'buy', 'buyer', 'cabin', 'cabinet', 'cable', 'cage', 'cake', 'calculate', 'calculation', 'calendar',
    'call', 'calm', 'camera', 'camp', 'campaign', 'campus', 'cancel', 'cancer', 'candidate', 'candle', 'candy',
    'canvas', 'capability', 'capable', 'capacity', 'capital', 'captain', 'capture', 'carbohydrate', 'carbon',
    'card', 'care', 'career', 'careful', 'carefully', 'cargo', 'carpet', 'carrier', 'carrot', 'carry', 'cart',
    'cartoon', 'carve', 'case', 'cash', 'casino', 'cast', 'casual', 'casualty', 'catalog', 'catch', 'category',
    'cattle', 'cause', 'cave', 'cease', 'ceiling', 'celebrate', 'celebration', 'celebrity', 'cell', 'cemetery',
    'center', 'central', 'century', 'ceremony', 'certain', 'certainly', 'chain', 'chair', 'chairman', 'challenge',
    'chamber', 'champion', 'championship', 'chance', 'change', 'changing', 'channel', 'chaos', 'chapter',
    'character', 'characteristic', 'characterize', 'charge', 'charity', 'charm', 'chart', 'charter', 'chase',
    'cheap', 'cheat', 'check', 'cheek', 'cheer', 'cheese', 'chef', 'chemical', 'chemistry', 'chest', 'chew',
    'chicken', 'chief', 'child', 'childhood', 'chill', 'chin', 'chip', 'chocolate', 'choice', 'cholesterol',
    'choose', 'chop', 'chronic', 'chunk', 'church', 'cigarette', 'circle', 'circuit', 'circumstance', 'cite',
    'citizen', 'citizenship', 'city', 'civic', 'civil', 'civilian', 'civilization', 'claim', 'class', 'classic',
    'classical', 'classify', 'classroom', 'clay', 'clean', 'clear', 'clearly', 'clerk', 'click', 'client', 'cliff',
    'climate', 'climb', 'cling', 'clinic', 'clinical', 'clip', 'clock', 'close', 'closed', 'closely', 'closer',
    'closest', 'closet', 'cloth', 'clothes', 'clothing', 'cloud', 'club', 'clue', 'cluster', 'coach', 'coal',
    'coalition', 'coast', 'coastal', 'coat', 'cocaine', 'code', 'coffee', 'cognitive', 'coin', 'cold',
    'collaboration', 'collapse', 'collar', 'colleague', 'collect', 'collection', 'collective', 'collector',
    'college', 'colonial', 'colony', 'color', 'colorful', 'column', 'columnist', 'combat', 'combination', 'combine',
    'combined', 'come', 'comedy', 'comfort', 'comfortable', 'coming', 'command', 'commander', 'comment',
    'commercial', 'commission', 'commissioner', 'commit', 'commitment', 'committee', 'commodity', 'common',
    'commonly', 'communicate', 'communication', 'community', 'companion', 'company', 'comparable', 'compare',
    'comparison', 'compel', 'compelling', 'compensation', 'compete', 'competition', 'competitive', 'competitor',
    'complain', 'complaint', 'complete', 'completely', 'complex', 'complexity', 'compliance', 'complicated',
    'comply', 'component', 'compose', 'composition', 'compound', 'comprehensive', 'comprise', 'compromise',
    'computer', 'concede', 'conceive', 'concentrate', 'concentration', 'concept', 'conception', 'concern',
    'concerned', 'concerning', 'concert', 'conclude', 'conclusion', 'concrete', 'condemn', 'condition', 'conduct',
    'conference', 'confess', 'confession', 'confidence', 'confident', 'confirm', 'conflict', 'confront',
    'confrontation', 'confuse', 'confusion', 'congressional', 'connect', 'connection', 'conscience', 'conscious',
    'consciousness', 'consecutive', 'consensus', 'consent', 'consequence', 'consequently', 'conservation',
    'conservative', 'consider', 'considerable', 'considerably', 'consideration', 'consist', 'consistent',
    'consistently', 'conspiracy', 'constant', 'constantly', 'constitute', 'constitution', 'constitutional',
    'constraint', 'construct', 'construction', 'consult', 'consultant', 'consume', 'consumer', 'consumption',
    'contact', 'contain', 'container', 'contemplate', 'contemporary', 'contend', 'content', 'contest', 'context',
    'continent', 'continue', 'continued', 'continuing', 'continuous', 'contract', 'contractor', 'contrast',
    'contribute', 'contribution', 'contributor', 'control', 'controversial', 'controversy', 'convenience',
    'convention', 'conventional', 'conversation', 'conversion', 'convert', 'convey', 'convict', 'conviction',
    'convince', 'convinced', 'cook', 'cookie', 'cooking', 'cool', 'cooperate', 'cooperation', 'cooperative',
    'coordinate', 'coordinator', 'cope', 'copy', 'cord', 'core', 'corn', 'corner', 'corporate', 'corporation',
    'correct', 'correctly', 'correlation', 'correspondent', 'corridor', 'corruption', 'cost', 'costly', 'costume',
    'cottage', 'cotton', 'couch', 'could', 'council', 'counsel', 'counseling', 'counselor', 'count', 'counter',
    'counterpart', 'country', 'county', 'coup', 'couple', 'courage', 'course', 'court', 'courtroom', 'cousin',
    'cover', 'coverage', 'crack', 'craft', 'crash', 'crawl', 'crazy', 'cream', 'create', 'creation', 'creative',
    'creativity', 'creature', 'credibility', 'credit', 'crew', 'crime', 'criminal', 'crisis', 'criteria', 'critic',
    'critical', 'criticism', 'criticize', 'crop', 'cross', 'crowd', 'crowded', 'crucial', 'cruel', 'cruise',
    'crush', 'crystal', 'cultural', 'culture', 'cure', 'curiosity', 'curious', 'currency', 'current', 'currently',
    'curriculum', 'curtain', 'curve', 'custody', 'custom', 'customer', 'cute', 'cycle', 'dad', 'daily', 'dam',
    'damage', 'damn', 'dance', 'dancer', 'dancing', 'danger', 'dangerous', 'dare', 'dark', 'darkness', 'data',
    'database', 'date', 'daughter', 'dawn', 'day', 'dead', 'deadline', 'deadly', 'deal', 'dealer', 'dear', 'death',
    'debate', 'debris', 'debt', 'debut', 'decade', 'decent', 'decide', 'decision', 'deck', 'declare', 'decline',
    'decorate', 'decrease', 'dedicate', 'deem', 'deep', 'deeply', 'deer', 'defeat', 'defend', 'defendant',
    'defender', 'defense', 'defensive', 'deficit', 'define', 'definitely', 'definition', 'degree', 'delay',
    'deliberately', 'delicate', 'delight', 'deliver', 'delivery', 'demand', 'democracy', 'democratic',
    'demographic', 'demonstrate', 'demonstration', 'denial', 'dense', 'density', 'deny', 'depart', 'department',
    'departure', 'depend', 'dependent', 'depending', 'depict', 'deploy', 'deposit', 'depressed', 'depression',
    'depth', 'deputy', 'derive', 'descend', 'describe', 'description', 'desert', 'deserve', 'design', 'designer',
    'desire', 'desk', 'desperate', 'desperately', 'despite', 'dessert', 'destination', 'destroy', 'destruction',
    'detail', 'detailed', 'detect', 'detective', 'determination', 'determine', 'devastating', 'develop',
    'developer', 'developing', 'development', 'developmental', 'device', 'devil', 'devote', 'diabetes', 'diagnose',
    'diagnosis', 'dialogue', 'diamond', 'diary', 'dictate', 'diet', 'differ', 'difference', 'different',
    'differently', 'difficult', 'difficulty', 'digital', 'dignity', 'dilemma', 'dimension', 'diminish', 'dining',
    'dinner', 'diplomat', 'diplomatic', 'direct', 'direction', 'directly', 'director', 'dirt', 'dirty',
    'disability', 'disabled', 'disagree', 'disappear', 'disappointed', 'disappointment', 'disaster', 'disc',
    'discipline', 'disclose', 'discount', 'discourage', 'discourse', 'discover', 'discovery', 'discrimination',
    'discuss', 'discussion', 'disease', 'dish', 'disk', 'dismiss', 'disorder', 'display', 'dispute', 'dissolve',
    'distance', 'distant', 'distinct', 'distinction', 'distinctive', 'distinguish', 'distract', 'distribute',
    'distribution', 'district', 'disturb', 'disturbing', 'diverse', 'diversity', 'divide', 'divine', 'division',
    'divorce', 'dock', 'doctor', 'doctrine', 'document', 'documentary', 'doll', 'domain', 'domestic', 'dominant',
    'dominate', 'donate', 'donation', 'donor', 'door', 'doorway', 'dose', 'double', 'doubt', 'dough', 'down',
    'downtown', 'dozen', 'draft', 'drag', 'drain', 'drama', 'dramatic', 'dramatically', 'draw', 'drawer', 'drawing',
    'dream', 'dress', 'dried', 'drift', 'drill', 'drink', 'drinking', 'drive', 'driver', 'driveway', 'driving',
    'drop', 'drown', 'drug', 'drum', 'drunk', 'duck', 'dumb', 'dump', 'during', 'dust', 'duty', 'dying', 'dynamic',
    'dynamics', 'e-mail', 'each', 'eager', 'early', 'earn', 'earnings', 'earth', 'earthquake', 'ease', 'easily',
    'east', 'eastern', 'easy', 'eat', 'eating', 'echo', 'ecological', 'economic', 'economically', 'economics',
    'economist', 'economy', 'ecosystem', 'edge', 'edit', 'edition', 'editor', 'educate', 'education', 'educational',
    'educator', 'effect', 'effective', 'effectively', 'effectiveness', 'efficiency', 'efficient', 'effort', 'eight',
    'eighth', 'either', 'elaborate', 'elbow', 'elder', 'elderly', 'elect', 'election', 'electric', 'electrical',
    'electricity', 'electronic', 'electronics', 'elegant', 'element', 'elementary', 'elephant', 'elevator',
    'eleven', 'eligible', 'eliminate', 'elite', 'else', 'elsewhere', 'embarrassed', 'embrace', 'emerge',
    'emergency', 'emerging', 'emission', 'emotion', 'emotional', 'emotionally', 'emphasis', 'emphasize', 'empire',
    'employ', 'employee', 'employer', 'employment', 'empty', 'enable', 'enact', 'encounter', 'encourage',
    'encouraging', 'endless', 'endorse', 'endure', 'enemy', 'energy', 'enforce', 'enforcement', 'engage',
    'engagement', 'engine', 'engineer', 'engineering', 'enhance', 'enjoy', 'enormous', 'enough', 'enroll', 'ensure',
    'enter', 'enterprise', 'entertainment', 'enthusiasm', 'entire', 'entirely', 'entitle', 'entity', 'entrance',
    'entrepreneur', 'entry', 'envelope', 'environment', 'environmental', 'envision', 'epidemic', 'episode', 'equal',
    'equality', 'equally', 'equation', 'equip', 'equipment', 'equity', 'equivalent', 'error', 'escape',
    'especially', 'essay', 'essence', 'essential', 'essentially', 'establish', 'establishment', 'estate',
    'estimate', 'estimated', 'etc', 'ethical', 'ethics', 'ethnic', 'evaluate', 'evaluation', 'even', 'evening',
    'event', 'eventually', 'ever', 'every', 'everybody', 'everyday', 'everyone', 'everything', 'everywhere',
    'evidence', 'evident', 'evil', 'evolution', 'evolve', 'exact', 'exactly', 'exam', 'examination', 'examine',
    'example', 'exceed', 'excellent', 'except', 'exception', 'excessive', 'exchange', 'excited', 'excitement',
    'exciting', 'exclude', 'exclusive', 'exclusively', 'excuse', 'execute', 'execution', 'executive', 'exercise',
    'exhaust', 'exhibit', 'exhibition', 'exist', 'existence', 'existing', 'exit', 'exotic', 'expand', 'expansion',
    'expect', 'expectation', 'expected', 'expedition', 'expense', 'expensive', 'experience', 'experienced',
    'experiment', 'experimental', 'expert', 'expertise', 'explain', 'explanation', 'explicit', 'explode', 'exploit',
    'exploration', 'explore', 'explosion', 'export', 'expose', 'exposure', 'express', 'expression', 'extend',
    'extended', 'extension', 'extensive', 'extent', 'external', 'extra', 'extraordinary', 'extreme', 'extremely',
    'eyebrow', 'fabric', 'face', 'facilitate', 'facility', 'fact', 'factor', 'factory', 'faculty', 'fade', 'fail',
    'failure', 'faint', 'fair', 'fairly', 'faith', 'fall', 'false', 'fame', 'familiar', 'family', 'famous',
    'fantastic', 'fantasy', 'fare', 'farm', 'farmer', 'fascinating', 'fashion', 'fast', 'faster', 'fatal', 'fate',
    'father', 'fatigue', 'fault', 'favor', 'favorable', 'favorite', 'fear', 'feather', 'feature', 'federal', 'fee',
    'feed', 'feedback', 'feel', 'feeling', 'fellow', 'female', 'feminist', 'fence', 'festival', 'fever', 'few',
    'fewer', 'fiber', 'fiction', 'field', 'fierce', 'fifteen', 'fifth', 'fifty', 'fight', 'fighter', 'fighting',
    'figure', 'file', 'fill', 'film', 'filter', 'final', 'finally', 'finance', 'financial', 'find', 'finding',
    'fine', 'finger', 'finish', 'fire', 'firm', 'firmly', 'first', 'fiscal', 'fish', 'fisherman', 'fishing', 'fist',
    'fitness', 'five', 'fixed', 'flag', 'flame', 'flash', 'flat', 'flavor', 'flee', 'fleet', 'flesh', 'flexibility',
    'flexible', 'flight', 'flip', 'float', 'flood', 'floor', 'flour', 'flow', 'flower', 'fluid', 'flying', 'focus',
    'fold', 'folk', 'follow', 'following', 'food', 'fool', 'foot', 'football', 'forbid', 'force', 'forehead',
    'foreign', 'foreigner', 'forest', 'forever', 'forget', 'forgive', 'fork', 'form', 'formal', 'format',
    'formation', 'former', 'formerly', 'formula', 'forth', 'fortunately', 'fortune', 'forty', 'forum', 'forward',
    'foster', 'found', 'foundation', 'founder', 'four', 'fourth', 'fraction', 'fragile', 'fragment', 'frame',
    'framework', 'franchise', 'frankly', 'fraud', 'free', 'freedom', 'freely', 'freeze', 'frequency', 'frequent',
    'frequently', 'fresh', 'freshman', 'friend', 'friendly', 'friendship', 'from', 'front', 'frontier', 'frown',
    'frozen', 'fruit', 'frustrate', 'frustration', 'fucking', 'fuel', 'full', 'full-time', 'fully', 'function',
    'functional', 'fund', 'fundamental', 'funding', 'funeral', 'funny', 'furniture', 'furthermore', 'future',
    'gain', 'galaxy', 'gallery', 'game', 'gang', 'garage', 'garbage', 'garden', 'garlic', 'gasoline', 'gate',
    'gather', 'gathering', 'gaze', 'gear', 'gender', 'gene', 'general', 'generally', 'generate', 'generation',
    'generous', 'genetic', 'genius', 'genre', 'gentle', 'gentleman', 'gently', 'genuine', 'gesture', 'ghost',
    'giant', 'gift', 'gifted', 'girl', 'girlfriend', 'give', 'given', 'glad', 'glance', 'glass', 'glimpse',
    'global', 'globe', 'glory', 'glove', 'goal', 'goat', 'gold', 'golden', 'golf', 'good', 'govern', 'government',
    'governor', 'grab', 'grace', 'grade', 'gradually', 'graduate', 'graduation', 'grain', 'grand', 'grandchild',
    'grandfather', 'grandmother', 'grandparent', 'grant', 'grape', 'grasp', 'grass', 'grateful', 'grave', 'gravity',
    'gray', 'great', 'greatest', 'greatly', 'green', 'greet', 'grief', 'grin', 'grip', 'grocery', 'gross', 'ground',
    'group', 'grow', 'growing', 'growth', 'guarantee', 'guard', 'guess', 'guest', 'guidance', 'guide', 'guideline',
    'guilt', 'guilty', 'guitar', 'habit', 'habitat', 'hair', 'half', 'halfway', 'hall', 'hallway', 'hand',
    'handful', 'handle', 'handsome', 'hang', 'happen', 'happily', 'happiness', 'happy', 'harassment', 'hard',
    'hardly', 'hardware', 'harm', 'harmony', 'harsh', 'harvest', 'hate', 'haul', 'have', 'hazard', 'head',
    'headache', 'headline', 'headquarters', 'heal', 'health', 'health-care', 'healthy', 'hear', 'hearing', 'heart',
    'heat', 'heaven', 'heavily', 'heavy', 'heel', 'height', 'helicopter', 'hell', 'hello', 'helmet', 'help',
    'helpful', 'hence', 'herb', 'here', 'heritage', 'hero', 'hers', 'herself', 'hesitate', 'hidden', 'hide', 'high',
    'high-tech', 'highlight', 'highly', 'highway', 'hike', 'hill', 'himself', 'hint', 'hire', 'historian',
    'historic', 'historical', 'historically', 'history', 'hockey', 'hold', 'hole', 'holiday', 'holy', 'home',
    'homeland', 'homeless', 'homework', 'honest', 'honestly', 'honey', 'honor', 'hook', 'hope', 'hopefully',
    'horizon', 'hormone', 'horn', 'horrible', 'horror', 'horse', 'hospital', 'host', 'hostage', 'hostile', 'hotel',
    'hour', 'house', 'household', 'housing', 'however', 'huge', 'human', 'humanity', 'humor', 'hundred', 'hunger',
    'hungry', 'hunt', 'hunter', 'hunting', 'hurricane', 'hurry', 'hurt', 'husband', 'hypothesis', 'icon', 'idea',
    'ideal', 'identical', 'identification', 'identify', 'identity', 'ideological', 'ideology', 'ignore', 'illegal',
    'illness', 'illusion', 'illustrate', 'image', 'imagination', 'imagine', 'immediate', 'immediately', 'immigrant',
    'immigration', 'immune', 'impact', 'implement', 'implementation', 'implication', 'imply', 'import',
    'importance', 'important', 'importantly', 'impose', 'impossible', 'impress', 'impression', 'impressive',
    'improve', 'improved', 'improvement', 'impulse', 'incentive', 'incident', 'include', 'including', 'income',
    'incorporate', 'increase', 'increased', 'increasing', 'increasingly', 'incredible', 'incredibly', 'indeed',
    'independence', 'independent', 'index', 'indicate', 'indication', 'indicator', 'indigenous', 'individual',
    'industrial', 'industry', 'inevitable', 'inevitably', 'infant', 'infection', 'inflation', 'influence',
    'influential', 'inform', 'informal', 'information', 'infrastructure', 'ingredient', 'inherent', 'inherit',
    'initial', 'initially', 'initiate', 'initiative', 'injure', 'injury', 'inmate', 'inner', 'innocent',
    'innovation', 'innovative', 'input', 'inquiry', 'insect', 'insert', 'inside', 'insight', 'insist', 'inspection',
    'inspector', 'inspiration', 'inspire', 'install', 'installation', 'instance', 'instant', 'instantly', 'instead',
    'instinct', 'institution', 'institutional', 'instruct', 'instruction', 'instructional', 'instructor',
    'instrument', 'insurance', 'intact', 'integrate', 'integrated', 'integration', 'integrity', 'intellectual',
    'intelligence', 'intelligent', 'intend', 'intense', 'intensity', 'intent', 'intention', 'interact',
    'interaction', 'interest', 'interested', 'interesting', 'interfere', 'interior', 'internal', 'international',
    'interpret', 'interpretation', 'interrupt', 'interval', 'intervention', 'interview', 'intimate', 'into',
    'introduce', 'introduction', 'invade', 'invasion', 'invent', 'invention', 'inventory', 'invest', 'investigate',
    'investigation', 'investigator', 'investment', 'investor', 'invisible', 'invitation', 'invite', 'involve',
    'involved', 'involvement', 'iron', 'ironically', 'irony', 'island', 'isolate', 'isolated', 'isolation', 'issue',
    'item', 'itself', 'jacket', 'jail', 'jar', 'jaw', 'jazz', 'jeans', 'jewelry', 'job', 'join', 'joint', 'joke',
    'journal', 'journalism', 'journalist', 'journey', 'joy', 'judge', 'judgment', 'judicial', 'juice', 'jump',
    'jungle', 'junior', 'jurisdiction', 'juror', 'jury', 'just', 'justice', 'justify', 'keep', 'key', 'kick',
    'kill', 'killer', 'killing', 'kind', 'king', 'kingdom', 'kiss', 'kitchen', 'knee', 'kneel', 'knife', 'knock',
    'know', 'knowledge', 'known', 'label', 'labor', 'laboratory', 'lack', 'ladder', 'lady', 'lake', 'lamp', 'land',
    'landing', 'landmark', 'landscape', 'lane', 'language', 'large', 'largely', 'laser', 'last', 'late', 'lately',
    'later', 'latter', 'laugh', 'laughter', 'launch', 'laundry', 'lawmaker', 'lawn', 'lawsuit', 'lawyer', 'layer',
    'lead', 'leader', 'leadership', 'leading', 'leaf', 'league', 'lean', 'leap', 'learn', 'learning', 'least',
    'leather', 'leave', 'lecture', 'left', 'leg', 'legacy', 'legal', 'legally', 'legend', 'legislation',
    'legislative', 'legislator', 'legislature', 'legitimate', 'lemon', 'lend', 'length', 'lens', 'less', 'lesson',
    'let', 'letter', 'level', 'liability', 'liberal', 'liberty', 'library', 'license', 'life', 'lifestyle',
    'lifetime', 'lift', 'light', 'lighting', 'lightly', 'lightning', 'like', 'likelihood', 'likely', 'likewise',
    'limb', 'limit', 'limitation', 'limited', 'line', 'link', 'lion', 'liquid', 'list', 'listen', 'listener',
    'literally', 'literary', 'literature', 'little', 'live', 'liver', 'living', 'load', 'loan', 'lobby', 'local',
    'locate', 'location', 'lock', 'logic', 'logical', 'lonely', 'long', 'long-term', 'longtime', 'look', 'loop',
    'loose', 'lose', 'loss', 'lost', 'lots', 'loud', 'love', 'lovely', 'lover', 'lower', 'loyal', 'loyalty', 'luck',
    'lucky', 'lunch', 'lung', 'machine', 'magazine', 'magic', 'magnetic', 'magnitude', 'mail', 'main', 'mainly',
    'mainstream', 'maintain', 'maintenance', 'major', 'majority', 'make', 'maker', 'makeup', 'male', 'mall',
    'manage', 'management', 'manager', 'managing', 'mandate', 'manipulate', 'manner', 'mansion', 'manual',
    'manufacturer', 'manufacturing', 'many', 'marble', 'march', 'margin', 'marine', 'mark', 'marker', 'market',
    'marketing', 'marketplace', 'marriage', 'married', 'marry', 'mask', 'mass', 'massive', 'master', 'match',
    'mate', 'material', 'math', 'mathematics', 'matter', 'maximum', 'maybe', 'mayor', 'meal', 'mean', 'meaning',
    'meaningful', 'meantime', 'meanwhile', 'measure', 'measurement', 'meat', 'mechanic', 'mechanical', 'mechanism',
    'medal', 'media', 'medical', 'medication', 'medicine', 'medium', 'meet', 'meeting', 'melt', 'member',
    'membership', 'memory', 'mental', 'mentally', 'mention', 'mentor', 'menu', 'merchant', 'mere', 'merely',
    'merit', 'mess', 'message', 'metal', 'metaphor', 'meter', 'method', 'metropolitan', 'middle', 'middle-class',
    'midnight', 'midst', 'might', 'migration', 'mild', 'military', 'milk', 'mill', 'million', 'mind', 'mine',
    'mineral', 'minimal', 'minimize', 'minimum', 'minister', 'ministry', 'minor', 'minority', 'minute', 'miracle',
    'mirror', 'miss', 'missile', 'missing', 'mission', 'missionary', 'mistake', 'mix', 'mixed', 'mixture', 'mm-hmm',
    'mobile', 'mode', 'model', 'moderate', 'modern', 'modest', 'modify', 'molecule', 'moment', 'momentum', 'money',
    'monitor', 'monkey', 'monster', 'month', 'monthly', 'monument', 'mood', 'moon', 'moral', 'more', 'moreover',
    'morning', 'mortality', 'mortgage', 'most', 'mostly', 'mother', 'motion', 'motivate', 'motivation', 'motive',
    'motor', 'mount', 'mountain', 'mouse', 'mouth', 'move', 'movement', 'movie', 'much', 'multiple', 'municipal',
    'murder', 'muscle', 'museum', 'mushroom', 'music', 'musical', 'musician', 'must', 'mutter', 'mutual', 'myself',
    'mysterious', 'mystery', 'myth', 'nail', 'naked', 'name', 'narrative', 'narrow', 'nasty', 'nation', 'national',
    'nationwide', 'native', 'natural', 'naturally', 'nature', 'naval', 'near', 'nearby', 'nearly', 'neat',
    'necessarily', 'necessary', 'necessity', 'neck', 'need', 'needle', 'negative', 'negotiate', 'negotiation',
    'neighbor', 'neighborhood', 'neighboring', 'neither', 'nerve', 'nervous', 'nest', 'network', 'neutral', 'never',
    'nevertheless', 'newly', 'news', 'newspaper', 'next', 'nice', 'night', 'nightmare', 'nine', 'nobody', 'noise',
    'nomination', 'nominee', 'none', 'nonetheless', 'nonprofit', 'noon', 'norm', 'normal', 'normally', 'north',
    'northeast', 'northern', 'northwest', 'nose', 'note', 'notebook', 'nothing', 'notice', 'notion', 'novel',
    'nowhere', 'nuclear', 'number', 'numerous', 'nurse', 'nutrient', "o'clock", 'oak', 'object', 'objection',
    'objective', 'obligation', 'observation', 'observe', 'observer', 'obstacle', 'obtain', 'obvious', 'obviously',
    'occasion', 'occasional', 'occasionally', 'occupation', 'occupy', 'occur', 'ocean', 'odd', 'odds', 'off',
    'offender', 'offense', 'offensive', 'offer', 'offering', 'office', 'officer', 'official', 'officially', 'often',
    'okay', 'old-fashioned', 'once', 'one-third', 'ongoing', 'onion', 'online', 'only', 'onto', 'open', 'opening',
    'openly', 'opera', 'operate', 'operating', 'operation', 'operator', 'opinion', 'opponent', 'opportunity',
    'oppose', 'opposed', 'opposite', 'opposition', 'optimistic', 'option', 'oral', 'orange', 'orbit', 'order',
    'ordinary', 'organ', 'organic', 'organism', 'organization', 'organizational', 'organize', 'organized',
    'orientation', 'origin', 'original', 'originally', 'other', 'others', 'otherwise', 'ought', 'our', 'ours',
    'ourselves', 'out', 'outcome', 'outdoor', 'outer', 'outfit', 'outlet', 'outline', 'output', 'outside',
    'outsider', 'outstanding', 'oven', 'over', 'overall', 'overcome', 'overlook', 'overnight', 'oversee',
    'overwhelm', 'overwhelming', 'owe', 'own', 'owner', 'ownership', 'oxygen', 'pace', 'pack', 'package', 'page',
    'pain', 'painful', 'paint', 'painter', 'painting', 'pair', 'palace', 'pale', 'palm', 'panel', 'panic', 'pant',
    'paper', 'parade', 'parent', 'parental', 'parish', 'park', 'parking', 'part', 'partial', 'partially',
    'participant', 'participate', 'participation', 'particle', 'particular', 'particularly', 'partly', 'partner',
    'partnership', 'party', 'pass', 'passage', 'passenger', 'passing', 'passion', 'past', 'pasta', 'pastor',
    'patch', 'patent', 'path', 'patience', 'patient', 'patrol', 'patron', 'pattern', 'pause', 'payment', 'peace',
    'peaceful', 'peak', 'peanut', 'peasant', 'peel', 'peer', 'penalty', 'pencil', 'pension', 'people', 'pepper',
    'perceive', 'perceived', 'percentage', 'perception', 'perfect', 'perfectly', 'perform', 'performance',
    'performer', 'perhaps', 'period', 'permanent', 'permission', 'permit', 'persist', 'person', 'personal',
    'personality', 'personally', 'personnel', 'perspective', 'persuade', 'phase', 'phenomenon', 'philosophical',
    'philosophy', 'phone', 'photo', 'photograph', 'photographer', 'photography', 'phrase', 'physical', 'physically',
    'physician', 'physics', 'piano', 'pick', 'pickup', 'picture', 'pie', 'piece', 'pig', 'pile', 'pill', 'pillow',
    'pilot', 'pin', 'pine', 'pink', 'pioneer', 'pipe', 'pistol', 'pit', 'pitch', 'pitcher', 'pizza', 'place',
    'placement', 'plain', 'plaintiff', 'plan', 'plane', 'planet', 'planner', 'planning', 'plant', 'plastic',
    'plate', 'platform', 'play', 'player', 'playoff', 'plea', 'plead', 'pleasant', 'please', 'pleased', 'pleasure',
    'plenty', 'plot', 'plunge', 'plus', 'pocket', 'poem', 'poet', 'poetry', 'point', 'poke', 'pole', 'police',
    'policeman', 'policy', 'political', 'politically', 'politician', 'politics', 'poll', 'pollution', 'pond',
    'pool', 'poor', 'popular', 'popularity', 'population', 'porch', 'pork', 'port', 'portfolio', 'portion',
    'portrait', 'portray', 'pose', 'position', 'positive', 'possess', 'possession', 'possibility', 'possible',
    'possibly', 'post', 'poster', 'potato', 'potential', 'potentially', 'pound', 'pour', 'poverty', 'powder',
    'power', 'powerful', 'practical', 'practically', 'practice', 'practitioner', 'praise', 'pray', 'prayer',
    'preach', 'precious', 'precise', 'precisely', 'predator', 'predict', 'prediction', 'prefer', 'preference',
    'pregnancy', 'pregnant', 'preliminary', 'premise', 'premium', 'preparation', 'prepare', 'prescription',
    'presence', 'present', 'presentation', 'preserve', 'presidency', 'president', 'presidential', 'press',
    'pressure', 'presumably', 'pretend', 'pretty', 'prevail', 'prevent', 'prevention', 'previous', 'previously',
    'price', 'pride', 'priest', 'primarily', 'primary', 'prime', 'principal', 'principle', 'print', 'prior',
    'priority', 'prison', 'prisoner', 'privacy', 'private', 'privately', 'privilege', 'prize', 'probably',
    'problem', 'procedure', 'proceed', 'process', 'processing', 'processor', 'proclaim', 'produce', 'producer',
    'product', 'production', 'productive', 'productivity', 'profession', 'professional', 'professor', 'profile',
    'profit', 'profound', 'program', 'programming', 'progress', 'progressive', 'prohibit', 'project', 'projection',
    'prominent', 'promise', 'promising', 'promote', 'promotion', 'prompt', 'proof', 'proper', 'properly',
    'property', 'proportion', 'proposal', 'propose', 'proposed', 'prosecution', 'prosecutor', 'prospect', 'protect',
    'protection', 'protective', 'protein', 'protest', 'protocol', 'proud', 'prove', 'provide', 'provided',
    'provider', 'province', 'provision', 'provoke', 'psychological', 'psychologist', 'psychology', 'public',
    'publication', 'publicity', 'publicly', 'publish', 'publisher', 'pull', 'pulse', 'pump', 'punch', 'punish',
    'punishment', 'purchase', 'pure', 'purple', 'purpose', 'purse', 'pursue', 'pursuit', 'push', 'puzzle',
    'qualify', 'quality', 'quantity', 'quarter', 'quarterback', 'queen', 'quest', 'question', 'questionnaire',
    'quick', 'quickly', 'quiet', 'quietly', 'quit', 'quite', 'quote', 'rabbit', 'race', 'racial', 'racism', 'rack',
    'radar', 'radiation', 'radical', 'radio', 'rage', 'rail', 'railroad', 'rain', 'raise', 'rally', 'ranch',
    'random', 'range', 'rank', 'rape', 'rapid', 'rapidly', 'rare', 'rarely', 'rate', 'rather', 'rating', 'ratio',
    'rational', 'reach', 'react', 'reaction', 'read', 'reader', 'readily', 'reading', 'ready', 'real', 'realistic',
    'reality', 'realize', 'really', 'realm', 'rear', 'reason', 'reasonable', 'rebel', 'rebuild', 'recall',
    'receive', 'receiver', 'recent', 'recently', 'reception', 'recession', 'recipe', 'recipient', 'recognition',
    'recognize', 'recommend', 'recommendation', 'record', 'recording', 'recover', 'recovery', 'recruit', 'reduce',
    'reduction', 'refer', 'reference', 'reflect', 'reflection', 'reform', 'refrigerator', 'refuge', 'refugee',
    'refuse', 'regain', 'regard', 'regarding', 'regardless', 'regime', 'region', 'regional', 'register', 'regret',
    'regular', 'regularly', 'regulate', 'regulation', 'regulator', 'regulatory', 'rehabilitation', 'reinforce',
    'reject', 'relate', 'related', 'relation', 'relationship', 'relative', 'relatively', 'relax', 'release',
    'relevant', 'reliability', 'reliable', 'relief', 'relieve', 'religion', 'religious', 'reluctant', 'rely',
    'remain', 'remaining', 'remark', 'remarkable', 'remember', 'remind', 'reminder', 'remote', 'removal', 'remove',
    'render', 'rent', 'rental', 'repair', 'repeat', 'repeatedly', 'replace', 'replacement', 'reply', 'report',
    'reportedly', 'reporter', 'reporting', 'represent', 'representation', 'representative', 'republic',
    'republican', 'reputation', 'request', 'require', 'required', 'requirement', 'rescue', 'research', 'researcher',
    'resemble', 'reservation', 'reserve', 'residence', 'resident', 'residential', 'resign', 'resist', 'resistance',
    'resolution', 'resolve', 'resort', 'resource', 'respect', 'respectively', 'respond', 'respondent', 'response',
    'responsibility', 'responsible', 'rest', 'restaurant', 'restore', 'restrict', 'restriction', 'result', 'resume',
    'retail', 'retailer', 'retain', 'retire', 'retired', 'retirement', 'retreat', 'return', 'reveal', 'revelation',
    'revenue', 'reverse', 'review', 'revolution', 'revolutionary', 'reward', 'rhetoric', 'rhythm', 'ribbon', 'rice',
    'rich', 'ride', 'rider', 'ridge', 'ridiculous', 'rifle', 'right', 'ring', 'riot', 'rise', 'risk', 'risky',
    'ritual', 'rival', 'river', 'road', 'robot', 'rock', 'rocket', 'role', 'roll', 'rolling', 'romance', 'romantic',
    'roof', 'room', 'root', 'rope', 'rose', 'rough', 'roughly', 'round', 'route', 'routine', 'routinely', 'royal',
    'rubber', 'ruin', 'rule', 'ruling', 'rumor', 'runner', 'running', 'rural', 'rush', 'sack', 'sacred',
    'sacrifice', 'safe', 'safely', 'safety', 'sail', 'sake', 'salad', 'salary', 'sale', 'sales', 'salmon', 'salt',
    'same', 'sample', 'sanction', 'sand', 'sandwich', 'satellite', 'satisfaction', 'satisfy', 'sauce', 'save',
    'saving', 'scale', 'scan', 'scandal', 'scare', 'scared', 'scary', 'scatter', 'scenario', 'scene', 'scent',
    'schedule', 'scheme', 'scholar', 'scholarship', 'school', 'science', 'scientific', 'scientist', 'scope',
    'score', 'scramble', 'scratch', 'scream', 'screen', 'screening', 'screw', 'script', 'sculpture', 'seal',
    'search', 'season', 'seat', 'second', 'secondary', 'secret', 'secretary', 'section', 'sector', 'secular',
    'secure', 'security', 'seed', 'seek', 'seem', 'seemingly', 'segment', 'seize', 'seldom', 'select', 'selected',
    'selection', 'self', 'self-esteem', 'sell', 'seller', 'seminar', 'senator', 'send', 'senior', 'sensation',
    'sense', 'sensitive', 'sensitivity', 'sensor', 'sentence', 'sentiment', 'separate', 'separation', 'sequence',
    'series', 'serious', 'seriously', 'servant', 'serve', 'service', 'serving', 'session', 'setting', 'settle',
    'settlement', 'seven', 'seventh', 'several', 'severe', 'severely', 'sexual', 'sexuality', 'sexually', 'sexy',
    'shade', 'shadow', 'shake', 'shall', 'shallow', 'shame', 'shape', 'share', 'shared', 'shareholder', 'shark',
    'sharp', 'sharply', 'shed', 'sheep', 'sheer', 'sheet', 'shelf', 'shell', 'shelter', 'shift', 'shine', 'ship',
    'shirt', 'shit', 'shock', 'shoe', 'shoot', 'shooting', 'shop', 'shopping', 'shore', 'short', 'short-term',
    'shortage', 'shortly', 'shorts', 'shot', 'should', 'shoulder', 'shout', 'shove', 'show', 'shower', 'shrimp',
    'shrink', 'shrug', 'shut', 'shuttle', 'shy', 'sibling', 'sick', 'side', 'sidewalk', 'sigh', 'sight', 'sign',
    'signal', 'signature', 'significance', 'significant', 'significantly', 'silence', 'silent', 'silk', 'silly',
    'silver', 'similar', 'similarity', 'similarly', 'simple', 'simply', 'simultaneously', 'sin', 'since', 'sing',
    'singer', 'single', 'sink', 'sir', 'sister', 'sit', 'site', 'situation', 'six', 'sixth', 'size', 'ski', 'skill',
    'skilled', 'skin', 'skip', 'skirt', 'skull', 'sky', 'slam', 'slap', 'slave', 'slavery', 'sleep', 'sleeve',
    'slice', 'slide', 'slight', 'slightly', 'slip', 'slope', 'slot', 'slow', 'slowly', 'small', 'smart', 'smell',
    'smile', 'smoke', 'smooth', 'snake', 'snap', 'sneak', 'snow', 'so-called', 'soak', 'soap', 'soar', 'soccer',
    'social', 'socially', 'society', 'sock', 'sodium', 'sofa', 'soft', 'soften', 'softly', 'software', 'soil',
    'solar', 'soldier', 'sole', 'solely', 'solid', 'solution', 'solve', 'some', 'somebody', 'someday', 'somehow',
    'someone', 'something', 'sometime', 'sometimes', 'somewhat', 'somewhere', 'son', 'song', 'soon',
    'sophisticated', 'sorry', 'sort', 'soul', 'sound', 'soup', 'source', 'south', 'southeast', 'southern',
    'southwest', 'sovereignty', 'space', 'spare', 'spark', 'speak', 'speaker', 'special', 'specialist',
    'specialize', 'specialty', 'species', 'specific', 'specifically', 'specify', 'spectacular', 'spectrum',
    'speculate', 'speculation', 'speech', 'speed', 'spell', 'spend', 'spending', 'sphere', 'spill', 'spin', 'spine',
    'spirit', 'spiritual', 'spit', 'spite', 'split', 'spokesman', 'sponsor', 'spoon', 'sport', 'spot', 'spouse',
    'spray', 'spread', 'spring', 'sprinkle', 'spy', 'squad', 'square', 'squeeze', 'stability', 'stable', 'stack',
    'stadium', 'staff', 'stage', 'stair', 'stake', 'stance', 'stand', 'standard', 'standing', 'star', 'stare',
    'start', 'starter', 'starting', 'state', 'statement', 'station', 'statistical', 'statistics', 'statue',
    'status', 'statute', 'stay', 'steadily', 'steady', 'steak', 'steal', 'steam', 'steel', 'steep', 'steer', 'stem',
    'step', 'stereotype', 'stick', 'stiff', 'still', 'stimulate', 'stimulus', 'stir', 'stock', 'stomach', 'stone',
    'stop', 'storage', 'store', 'storm', 'story', 'stove', 'straight', 'straighten', 'strain', 'strange',
    'stranger', 'strategic', 'strategy', 'straw', 'streak', 'stream', 'street', 'strength', 'strengthen', 'stress',
    'stretch', 'strict', 'strictly', 'strike', 'striking', 'string', 'strip', 'stroke', 'strong', 'strongly',
    'structural', 'structure', 'struggle', 'student', 'studio', 'study', 'stuff', 'stumble', 'stupid', 'style',
    'subject', 'submit', 'subsequent', 'subsidy', 'substance', 'substantial', 'substantially', 'subtle', 'suburb',
    'suburban', 'succeed', 'success', 'successful', 'successfully', 'such', 'suck', 'sudden', 'suddenly', 'suffer',
    'suffering', 'sufficient', 'sugar', 'suggest', 'suggestion', 'suicide', 'suit', 'suitable', 'suite', 'summary',
    'summer', 'summit', 'sunlight', 'sunny', 'super', 'superior', 'supermarket', 'supervisor', 'supplier', 'supply',
    'support', 'supporter', 'supportive', 'suppose', 'supposed', 'supposedly', 'sure', 'surely', 'surface',
    'surgeon', 'surgery', 'surprise', 'surprised', 'surprising', 'surprisingly', 'surround', 'surrounding',
    'surveillance', 'survey', 'survival', 'survive', 'survivor', 'suspect', 'suspend', 'suspicion', 'suspicious',
    'sustain', 'sustainable', 'swallow', 'swear', 'sweat', 'sweater', 'sweep', 'sweet', 'swell', 'swim', 'swimming',
    'swing', 'switch', 'sword', 'symbol', 'symbolic', 'sympathy', 'symptom', 'syndrome', 'system', 'table',
    'tablespoon', 'tackle', 'tactic', 'tag', 'tail', 'take', 'tale', 'talent', 'talented', 'talk', 'tall', 'tank',
    'tap', 'tape', 'target', 'task', 'taste', 'tax', 'taxpayer', 'teach', 'teacher', 'teaching', 'team', 'teammate',
    'tear', 'teaspoon', 'technical', 'technician', 'technique', 'technological', 'technology', 'teen', 'teenage',
    'teenager', 'telephone', 'telescope', 'television', 'tell', 'temperature', 'temple', 'temporary', 'tend',
    'tendency', 'tender', 'tennis', 'tension', 'tent', 'term', 'terms', 'terrain', 'terrible', 'terribly',
    'terrific', 'territory', 'terror', 'terrorism', 'terrorist', 'test', 'testify', 'testimony', 'testing', 'text',
    'textbook', 'texture', 'than', 'thank', 'thanks', 'that', 'theater', 'their', 'them', 'theme', 'themselves',
    'then', 'theological', 'theology', 'theoretical', 'theory', 'therapist', 'therapy', 'there', 'thereby',
    'therefore', 'these', 'they', 'thick', 'thigh', 'thin', 'thing', 'think', 'thinking', 'third', 'thirty', 'this',
    'thoroughly', 'those', 'though', 'thought', 'thousand', 'thread', 'threat', 'threaten', 'three', 'threshold',
    'thrive', 'throat', 'through', 'throughout', 'throw', 'thumb', 'thus', 'ticket', 'tide', 'tight', 'tighten',
    'tightly', 'tile', 'till', 'timber', 'time', 'timing', 'tiny', 'tire', 'tired', 'tissue', 'title', 'tobacco',
    'today', 'together', 'toilet', 'tolerance', 'tolerate', 'toll', 'tomato', 'tomorrow', 'tone', 'tongue',
    'tonight', 'tool', 'tooth', 'topic', 'toss', 'total', 'totally', 'touch', 'touchdown', 'tough', 'tour',
    'tourism', 'tourist', 'tournament', 'toward', 'towards', 'towel', 'tower', 'town', 'toxic', 'trace', 'track',
    'trade', 'trading', 'tradition', 'traditional', 'traditionally', 'traffic', 'tragedy', 'tragic', 'trail',
    'trailer', 'train', 'trainer', 'training', 'trait', 'transaction', 'transfer', 'transform', 'transformation',
    'transit', 'transition', 'translate', 'translation', 'transmission', 'transmit', 'transport', 'transportation',
    'trap', 'trash', 'trauma', 'travel', 'traveler', 'tray', 'treasure', 'treat', 'treatment', 'treaty', 'tree',
    'tremendous', 'trend', 'trial', 'tribal', 'tribe', 'trick', 'trigger', 'trim', 'trip', 'triumph', 'troop',
    'tropical', 'trouble', 'troubled', 'truck', 'true', 'truly', 'trunk', 'trust', 'truth', 'try', 'tube', 'tuck',
    'tumor', 'tune', 'tunnel', 'turkey', 'turn', 'twelve', 'twentieth', 'twenty', 'twice', 'twin', 'twist',
    'two-thirds', 'type', 'typical', 'typically', 'ugly', 'ultimate', 'ultimately', 'unable', 'uncertain',
    'uncertainty', 'uncle', 'uncomfortable', 'uncover', 'under', 'undergo', 'undergraduate', 'underlying',
    'undermine', 'understand', 'understanding', 'undertake', 'unemployment', 'unexpected', 'unfair', 'unfold',
    'unfortunately', 'unhappy', 'uniform', 'union', 'unique', 'unit', 'unite', 'unity', 'universal', 'universe',
    'university', 'unknown', 'unless', 'unlike', 'unlikely', 'unprecedented', 'until', 'unusual', 'update', 'upon',
    'upper', 'upset', 'upstairs', 'urban', 'urge', 'use', 'used', 'useful', 'user', 'usual', 'usually', 'utility',
    'utilize', 'vacation', 'vaccine', 'vacuum', 'valid', 'validity', 'valley', 'valuable', 'value', 'van', 'vanish',
    'variable', 'variation', 'variety', 'various', 'vary', 'vast', 'vegetable', 'vehicle', 'vendor', 'venture',
    'verbal', 'verdict', 'version', 'versus', 'vertical', 'very', 'vessel', 'veteran', 'victim', 'victory', 'video',
    'view', 'viewer', 'village', 'violate', 'violation', 'violence', 'violent', 'virtual', 'virtually', 'virtue',
    'virus', 'visible', 'vision', 'visit', 'visitor', 'visual', 'vital', 'vitamin', 'vocal', 'voice', 'volume',
    'voluntary', 'volunteer', 'vote', 'voter', 'voting', 'vulnerable', 'wage', 'wagon', 'waist', 'wait', 'wake',
    'walk', 'walking', 'wall', 'wander', 'want', 'warehouse', 'warm', 'warmth', 'warn', 'warning', 'warrior',
    'wash', 'waste', 'watch', 'water', 'wave', 'weak', 'weaken', 'weakness', 'wealth', 'wealthy', 'weapon', 'wear',
    'weather', 'weave', 'web', 'wedding', 'weed', 'week', 'weekend', 'weekly', 'weigh', 'weight', 'weird',
    'welcome', 'welfare', 'well', 'well-being', 'well-known', 'west', 'western', 'whale', 'what', 'whatever',
    'wheat', 'wheel', 'wheelchair', 'when', 'whenever', 'where', 'whereas', 'wherever', 'whether', 'which', 'while',
    'whip', 'whisper', 'white', 'who', 'whoever', 'whole', 'whom', 'whose', 'why', 'wide', 'widely', 'widespread',
    'widow', 'wife', 'wild', 'wilderness', 'wildlife', 'will', 'willing', 'willingness', 'win', 'wind', 'window',
    'wine', 'wing', 'winner', 'winter', 'wipe', 'wire', 'wisdom', 'wise', 'wish', 'with', 'withdraw', 'withdrawal',
    'within', 'without', 'witness', 'wolf', 'woman', 'wonder', 'wonderful', 'wood', 'wooden', 'word', 'work',
    'worker', 'working', 'workout', 'workplace', 'works', 'workshop', 'world', 'worldwide', 'worried', 'worry',
    'worth', 'would', 'wound', 'wrap', 'wrist', 'write', 'writer', 'writing', 'written', 'wrong', 'yard', 'yeah',
    'year', 'yell', 'yellow', 'yesterday', 'yield', 'young', 'youngster', 'your', 'yours', 'yourself', 'youth',
    'zone'
    ]

assert (len (words) == 4096)

reverse_words = { words[i]:i for i in range (4096) }

def words_to_num (l):
    n = 0
    for x in [reverse_words[w] for w in reversed(l)]:
        n <<= 12
        n |= x
    return n

def num_to_words (num):
    assert (num >= 0)
    l = []
    while num:
        l.append (words[num & 0xfff])
        num >>= 12
    return l

# --------------------------------------------------------------------------------
# bitcoin
# --------------------------------------------------------------------------------

class BadAddress (Exception):
    pass

import hashlib
from hashlib import sha256

b58_digits = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'

def base58_encode (n):
    l = []
    while n > 0:
        n, r = divmod (n, 58)
        l.insert (0, (b58_digits[r]))
    return ''.join (l)

def base58_decode (s):
    n = 0
    for ch in s:
        n *= 58
        digit = b58_digits.index (ch)
        n += digit
    return n

def dhash (s):
    return sha256(sha256(s).digest()).digest()

def rhash (s):
    h1 = hashlib.new ('ripemd160')
    h1.update (sha256(s).digest())
    return h1.digest()

def key_to_address (s):
    checksum = dhash ('\x00' + s)[:4]
    return '1' + base58_encode (
        int ('0x' + (s + checksum).encode ('hex'), 16)
        )

def address_to_key (s):
    # strip off leading '1'
    s = ('%048x' % base58_decode (s[1:])).decode ('hex')
    hash160, check0 = s[:-4], s[-4:]
    check1 = dhash ('\x00' + hash160)[:4]
    if check0 != check1:
        raise BadAddress (s)
    return hash160

# convert to/from words

def string_to_num (s):
    return int (s.encode ('hex'), 16)

def num_to_string (n):
    return ('%x' % n).decode ('hex')

def key_to_words (s):
    n = string_to_num (s)
    checksum = dhash ('\x00' + s)[:4]
    n <<= 32
    n |= string_to_num (checksum)
    return num_to_words (n)

def words_to_key (l):
    n = words_to_num (l)
    check0 = n & 0xffffffff
    n >>= 32
    hash160 = num_to_string (n)
    check1 = string_to_num (dhash ('\x00' + hash160)[:4])
    if check1 != check0:
        raise BadAddress (l)
    return hash160

if __name__ == '__main__':
    import sys
    W = sys.stdout.write
    if len(sys.argv) > 2:
        # convert words to address
        r = key_to_address (words_to_key (sys.argv[1:]))
        W ('%s\n' % (r,))
    elif len(sys.argv) == 2:
        addr = sys.argv[1]
        k = address_to_key (addr)
        l = key_to_words (k)
        r = key_to_address (words_to_key (l))
        W ('address= %s\n' % (addr,))
        W ('  words= %s\n' % (' '.join (l),))
        #W ('reverse= %r\n' % (r,))
    else:
        sys.stderr.write (
            "Usage: %s <bitcoin-address> [convert from bitcoin address to words]\n"
            "       %s <words> [convert from words to bitcoin address]\n" % (sys.argv[0], sys.argv[0])
            )
