public static ArrayList<ArrayList<Integer>> carryDisks(ArrayList<ArrayList<Integer>> a, int base, int to) {
        int from = getDiskLocation(a,base);
        if(from == to) return a;
        for(int i = 0; a.get(from).size() > i; i++) if(a.get(from).get(i) <= base) a.get(to).add(a.get(from).get(i));
        for(int i = a.get(from).size()-1; i >= 0; i--) if(a.get(from).get(i) <= base) a.get(from).remove(i);
        return a;
    }