UVa 11192 - Group Reverse

11192 - Group Reverse

 * http://acm.uva.es/p/v111/11192.html

Summary
A pretty standard string problem. Reverse groups of the string independently of one another.

Explanation
No explanation needed - simply follow the directions.

Input
3 ABCEHSHSH 5 FA0ETASINAHGRI0NATWON0QA0NARI0 1 ABCDE 0

Output
CBASHEHSH ATE0AFGHANISTAN0IRAQ0NOW0IRAN0 EDCBA