#NEWLINE# def insert( self , word ) : #NEWLINE# #INDENT# cur = self . root #NEWLINE# for c in word : #NEWLINE# #INDENT# if ( not ( c in cur . leaves ) ) : #NEWLINE# #INDENT# cur . leaves [ c ] = TrieNode ( ) #NEWLINE# #UNINDENT# cur = cur . leaves [ cur ] #NEWLINE# #UNINDENT# cur . is_string = True