Trie implementation in java - add, search and find max string.