SWAPC
InterviewTime limit1sMemory limit1024 MB
Given a string, pair the i-th P with the i-th C in order, swap the two characters in each pair, and print the resulting string.
- Level
Easy2 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
You have become the camp host for ICPC Sinchon, and you notice that the contest name is misspelled on the draft promotional poster. To clarify the name for the outsourced designer, you point at the poster and say "SUAPC". Unfortunately, the designer understands it as "SWAP P C".
Puzzled, the designer pairs the first P with the first C, the second P with the second C, and so on. The designer then swaps the positions within each pair.
Characters other than P and C stay as they are, and so does any leftover P or C after the maximum number of pairs is formed. Given the original text, output the text after the designer's edit.
Input
The first line contains the length of the original string . ()
The second line contains the string . consists only of uppercase English letters and contains no spaces.
Output
Print the string after the designer's edit on a single line.