For every uppercase letter found map that uppercase to original words
if ( words [ i ] [ j ] >= ' A ' && words [ i ] [ j ] <= ' Z ' ) { str += words [ i ] [ j ] ; if ( map . ContainsKey ( str ) ) map [ str ] = list ( map [ str ] , words [ i ] ) ; else map . Add ( str , list ( null , words [ i ] ) ) ; } } } bool wordFound = false ;