A thousand of protesters converged on the Ketagalan Boulevard as protests against a trade deal with China. All protesters already stood in a line. There is a service center which is dedicated to broadcast some names. When a guy is called by the service center, he/she will cut in ahead of the line immediately. Could you help to print out the name of protesters in the line when the broadcast is finished.
The input consists of four things.
The first line contains an integert, which indicates the number of test cases.
In each test case, the first line contains the name of protesters. (The length of the name will not bigger than 30.)
The second line indicates the number of protesters you need to maintenance.
The next line contains the name of broadcast list.
*means newline also means new link list
Please print out the names of people in the line from beginning to end after the broadcast.
Each answer is followed by a newline '
', namely std::endl;