Mary is hosting her annual party for April 20th to appreciate this very special day. She needs your help to make a mailing service to send invites to up to
Mary will need 3 types of invites for new artists, new occasion enthusiasts and returning guests. She will let you know what type of invite she wants for each of her guests by a string consisting of letters A
(New Artist), O
(New Occasion Enthusiast), R
(Returning guest), and X
for when she makes a mistake. The number of contiguous X
s represents how many characters ago she made a mistake and the following letter will be what replaces it. Note that she corrects a mistake immediately after writing the X
s required, and any following corrections will refer to the corrected string.
These are the 3 types of invites she would like you to issue:
- New Artist:
Dear [name], beloved artist, I would love to have you at my party. Come to my crib on April 20th.
- New Occasion Enthusiast:
Dear [name], beloved occasion enthusiast, come to my crib to celebrate this very special day.
- Returning Guest:
Dear [name], April 20th is happening again this year. Don't miss out.
Input Specification
The first line of input will consist of an integer
The second line of input will consist of an uppercase string
The next
Output Specification
Output
Sample Input
7
AORRROXXXAO
Miranda
Jonathan
Melina
Jason
Mark
Jina
Walid
Sample Output
Dear Miranda, beloved artist, I would love to have you at my party. Come to my crib on April 20th.
Dear Jonathan, beloved occasion enthusiast, come to my crib to celebrate this very special day.
Dear Melina, April 20th is happening again this year. Don't miss out.
Dear Jason, beloved artist, I would love to have you at my party. Come to my crib on April 20th.
Dear Mark, April 20th is happening again this year. Don't miss out.
Dear Jina, beloved occasion enthusiast, come to my crib to celebrate this very special day.
Dear Walid, beloved occasion enthusiast, come to my crib to celebrate this very special day.
Comments
Is there anything like this? AXOXAXOXAXO or AXOXXXR
e.g. could AAXOXXO replace the first X?
No, X's are never replaced.
<3