Implements searching a trie functionality.
Tested on 7 words of size 3 and k=1.