private static String solve(List<String> list) {
        if (list == null || list.isEmpty())
            return "";

        Map<String, String> map = new HashMap<>();
        String ss = "";
        for (int i = 0; i < list.size(); i++) {
            String s = list.get(i);
            String[] a = s.split(" ");
            ss = a[0];
            if (a.length > 3) {
                for (int j = 3; j < a.length; j++) {
                    if (a[j].endsWith(","))
                        map.put(a[j].substring(0, a[j].length() - 1), a[0]);
                    else
                        map.put(a[j], a[0]);

                }
            }
        }

        while (map.get(ss) != null) {
            ss = map.get(ss);
        }
        return ss;
    }
Why Did you create this class? what does it do?
src/adventofcode/RecursiveCircus.java