private static List<String> DoProcess(List<String> initials, List<HashMap<String, List<String>>> list) {
        if (initials.size() + list.size() != 6) {
            System.out.println("Problem!");
        }

        if (list.isEmpty()) {
            if (initials.get(0).substring(0, 2).equals(initials.get(initials.size() - 1).substring(2, 4))) {
                return initials;
            } else {
                return null;
            }
        }

        ArrayList<HashMap<String, List<String>>> listToProcess = new ArrayList<HashMap<String, List<String>>>(list);
        String key = initials.get(initials.size() - 1).substring(2, 4);
        for (Iterator<HashMap<String, List<String>>> it = list.iterator(); it.hasNext();) {
            HashMap<String, List<String>> hashMap = it.next();

            List<String> valueList = hashMap.get(key);
            if (valueList == null) {
                continue;
            }

            listToProcess.remove(hashMap);
            for (Iterator<String> it1 = valueList.iterator(); it1.hasNext();) {
                String newInitial = it1.next();

                ArrayList<String> newInitials = new ArrayList<String>(initials);
                newInitials.add(newInitial);
                List<String> result = DoProcess(newInitials, listToProcess);
                if (result != null) {
                    return result;
                }
            }
            listToProcess.add(hashMap);
        }

        return null;
    }