Regroup output printing