public Trie getTrieFromPrefix(String prefix) {
		TrieNode curNode = root;
		for (char c : prefix.toCharArray()) {
			int index = getIndex(c);
			if (curNode.children[index] == null) {
				return null;
			} else {
				curNode = curNode.children[index];
			}
		}
		return new Trie(curNode);
	}