Finished reversing groups cpp