EasyRating 900
Boys and Girls
Every second, each boy (B) standing directly in front of a girl (G) swaps places with her. Print the queue after t seconds.
Input
n t, then the queue.
Output
The queue.
Sample 1
Input
5 1 BGGBG
Output
GBGGB
Sample 2
Input
5 2 BGGBG
Output
GGBGB
Output appears here