public String find(ArrayList<String> wds) {
            if (wds.isEmpty() && ends.size() > 0) {
                return getEnd();
            }

            TreeNode next = connections.get(wds.get(0));

            if (next != null) {
                wds.remove(0);
                return next.find(wds);
            } else {
                if (wds.size() > 1) {
                    if (connections.get(wds.get(0) + wds.get(1)) != null) {
                        next = connections.get(wds.get(0) + wds.get(1));
                        String tmp = wds.remove(0);
                        String t2 = tmp + wds.remove(0);
                        return next.find(wds);
                    }
                }
            }

            return null;
        }