You are travelling in a foreign country. Although you are happy to try the local food, you cannot resist stopping when you find an Italian restaurant that serves pizza. Unfortunately the menu is written in the local language, so the lists of pizza ingredients mean nothing to you. What can you do?
The one thing you notice is that each pizza has an Italian name that sounds familiar, and for each of those names you remember which ingredients that pizza usually has. You want to use that knowledge to work out what each word in the ingredient lists might mean.
The first line of input contains the number of test cases t (0 < t ≤ 20).
Each test case begins with a line containing the number n of pizzas on the menu (1 ≤ n ≤ 60). The next 3·n lines describe those pizzas. Each pizza is described by three lines:
The number of ingredients on the two lines may differ, because a restaurant may use slightly different ingredients for a pizza of a given name, so the ingredients you remember need not match the ones actually listed.
For each test case, print every pair of words (w1, w2) such that w1 is an ingredient in the local language and w2 is an ingredient in your native language, and w1 and w2 appear on exactly the same set of pizzas (so w1 could mean the same ingredient as w2). Print each pair on its own line in the form (w1, w2). Sort the pairs in increasing lexicographical order by w1, breaking ties in increasing lexicographical order by w2. Print a blank line between consecutive test cases.