public List<String> search(String number) {
        Queue<String> tempQueue = new ArrayDeque<>();
        List<String> words = new LinkedList<>();

        tempQueue.add("");

        for (int i = 0; i < number.length(); i++) {
            String key = keyPad.get(number.charAt(i));

            for (int qLength = tempQueue.size(); qLength > 0; qLength--) {
                String prefix = tempQueue.remove();

                for (int j = 0; j < key.length(); j++) {
                    String str = prefix + key.charAt(j);

                    if (searchDictionary(str)) {
                        words.add(str);
                    } else {
                        tempQueue.add(str);
                    }
                }
            }
        }

        return words;
    }