Problem Statement:
You just got a new cell phone and want to copy the contact list from the old cell phone to the new one.
However, some of your friends changed their phone numbers so you don't want to copy the old number instead you want to update it with the new one


Input Format:
Integer N (0<N<10,000) represent the number of contacts in the old phone
Followed by N lines, each line contain "First Name", "Last Name" and a "Phone number"
Integer U (0<U<N) the number of friends who changed their phone numbers
Followed by N lines, each line contain "First Name", "Last Name" and a "Phone number"

First Name and Last Name maximum of 50 letters mixed uppercase and lowercase letter
Phone numbers maximum of 20 digits and might have leading zeros - + or ()


Output Format:
Print the final contact list that will be stored in the new phone, each contact in a different line


Sample Input:
3 Abdelrahman Elgammal +1(202)417-0330 Cook Door 16999 Ahmed Naguib 0123456789 2 AbdelRahman ElGammal +1(305)951-1169 Ahmed Naguib 0020123456788


Sample Output:
AbdelRahman ElGammal +1(305)951-1169 Cook Door 16999 Ahmed Naguib 0020123456788





Added by: gammal
Added at: 2015-02-17 23:48:10 UTC
Time Limit: 1 second
Partial score: No