UVa 11192 Group Reverse in CPP