For every uppercase letter found map that uppercase to original words
if ( words [ i ] [ j ] >= ' A ' and words [ i ] [ j ] <= ' Z ' ) : NEW_LINE INDENT string += words [ i ] [ j ] ; NEW_LINE if string not in map : NEW_LINE INDENT map [ string ] = [ words [ i ] ] NEW_LINE DEDENT elif map [ string ] is None : NEW_LINE INDENT map [ string ] = [ words [ i ] ] NEW_LINE DEDENT else : NEW_LINE INDENT map [ string ] . append ( words [ i ] ) ; NEW_LINE DEDENT DEDENT wordFound = False ; NEW_LINE