Figure 2 shows a map of the walled cities, their interconnecting tunnels and the number of security personnel.

Figure 2: Map of six cities and its interconnecting tunnels
The input will contain several test cases. The first line will indicate the number of test cases. Each test case begins with a number representing the number of walled cities. Cities are labeled alphabetically using the letters in the English alphabet. The subsequent lines contain the number of security personnel needed to protect the tunnel connecting each city to all other cities. A value of zero implies no security personnel needed since no tunnel exists. You are to output which tunnel should be protected and how many personnel are needed for each tunnel.
The output shows the tunnel connection which is named after the cities that it connects and the number of personel needed to protect the tunnel.