public static String permutationOrderSteps(final List<Integer> inputPerm) {
        final Set<List<Integer>> cycles = Algorithms.permutationCycles(inputPerm);
        StringBuilder result = new StringBuilder(64);
        StringBuilder orders = new StringBuilder("k = ");
        if (cycles.isEmpty()) {
            result.append("id");
            orders.append("1");
        } else {
            if (cycles.size() > 1)
                orders.append("[");
            int order = 1;
            for (List<Integer> cycle : cycles) {
                final int currentCycleOrder = cycle.size();
                order = Algorithms.lcm(order, currentCycleOrder);
                orders.append(currentCycleOrder).append(", ");
                result.append(permutationToString(cycle)).append(CIRC);
            }
            orders = new StringBuilder(orders.substring(0, orders.lastIndexOf(", ")));
            if (cycles.size() > 1)
                orders.append("] = ").append(order);
            result = new StringBuilder(result.substring(0, result.lastIndexOf(CIRC)));
        }
        result.append(NEWLINE).append(orders).append(NEWLINE);
        return result.toString();
    }