New Year's '15 P1 - Invitation Devastation

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

To prepare for the upcoming New Year's Party, princess Asseylum Vers Allusia did everything she possibly could to make it the best party of the year! She bought gifts, ordered food from a selection of restaurants, and even hired an orchestra to perform. But Asseylum has a feeling that she missed something. Something important. Suddenly, she realizes what it was that was bothering her. Asseylum was so busy making preparations that she forgot to send the invitations she had prepared! She has all of the addresses and invitations ready; all she needs to do is send them in proper order.

As Asseylum's assistant, your goal is to send Asseylum's invitation template to a list of N (1 \le N \le 10) invitees. In the template, Asseylum has used the character > to denote an invitee's name, and she's asked you to fill in the name of each invite so that she may promptly send the invitation letters.

Input Specification

The first line will contain Asseylum's invitation template (which is no longer than 250 characters long made of displayable ASCII characters and whitespace).
The next line will contain integer N, which indicates the number of people in the list of invitees.
The next N lines will contain the name of an invitee (no longer than 20 characters, with no spaces).

Output Specification

For each invitee, output their personalized invite message — that is, the template message with all > characters replaced by their name.

Sample Input

Dear >, you are invited to the New Year's get-together!
6
Inaho
Inko
Rayet
Calm
Nina
Okisuke

Sample Output

Dear Inaho, you are invited to the New Year's get-together!
Dear Inko, you are invited to the New Year's get-together!
Dear Rayet, you are invited to the New Year's get-together!
Dear Calm, you are invited to the New Year's get-together!
Dear Nina, you are invited to the New Year's get-together!
Dear Okisuke, you are invited to the New Year's get-together!

Comments


  • 1
    Zezima  commented on Jan. 22, 2015, 4:13 a.m.

    I guess if Eddelrittuo can drive a military Jeep, she can write some code to make invitations too. But where's Slaine?


    • 6
      Xyene  commented on Jan. 22, 2015, 5:22 a.m.

      We Slaine'd him.


    • -12
      FatalEagle  commented on Jan. 22, 2015, 5:21 a.m.

      This comment is hidden due to too much negative feedback. Show it anyway.