Invitation Devastation

View as PDF

Submit solution

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

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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
    BMP  commented on May 8, 2015, 5:03 p.m.

    Who remembers this thread?


  • 0
    Zezima  commented on Jan. 21, 2015, 11:13 p.m.

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


    • 4
      Xyene  commented on Jan. 22, 2015, 12:22 a.m.

      We Slaine'd him.


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

      Slaine is not invited because he is #PhaggotOfTheYear2014.