In a certain city there live a large number of egocentrics, who in addition are eccentrics. The ego- centricity means they want to live in an area where they feel they are the center of the city, and the eccentricity means they consider themselves to be the center in a very strange way. There are four types of egocentrics: horizontal (represented by “H”), vertical (“V”), diagonal (“D”) and antidiagonal (“A”). The city is organized on a grid, and it is divided into n by n sectors, and in each sector a number of people live (an integer number between 0 and 10000). An egocentric of type H considers he is the center of the city when in the row of sectors where he lives the total number of inhabitants in the sectors in the same row on the left and on the right coincide. If the type is V, D or A, the sums to coincide are those above and under the sector where the egocentric lives, and in the same column of sectors (V), in the same diagonal (D) or antidiagonal (A). For sectors on the limits of the city, it is considered that zero people are in the direction out of the city. Each egocentric can be of different types at the same time. So, we can have egocentrics of type H (horizontal), H D (horizontal and diagonal), or even with all the possible types: H V D A. Because the authorities know the big problem of egocentricity in the city, they want to elaborate a list of sectors where the egocentrics can be allocated according to their egocentric types. In that way the authorities could try to allocate each egocentric in the appropriate sector, so reducing their aggressiveness. Input The input begins with a line where the number of test cases (T) is indicated. The data for each test case appear in successive lines. In each test case the first line contains the size of the city (N, with maximum value 100, and the city has N by N sectors). Following there are N lines, each with N integers between 0 and 10000, separated by a space. Output The output consists of a set of lines for each problem. For each problem, the sectors which accomplish the conditions for the four types of egocentricity are enumerated. The types are enumerated in the order H, V, D, A. For each city the first line is “H” and following this line appear the numbers of row and column of all the sectors which satisfy the condition for the H egocentricity. The rows and columns are numbered from 0 to N − 1. Each sector appears in a line, first the number of the row, then a space, and finally the number of the column. After the H egocentricity, the V egocentricity is represented, with a line with “V” and the following lines, with each line representing a sector which satisfies the V egocentric condition. The sectors for the other egocentric types are represented in the same way, and in the order “D”, “A”. When there is no sector with this egocentric condition for a type, the line with the letter including the type appears. The sectors must appear, first those with lowest row, and for each row first those with lowest column. Sample Input 3 3 123 456 789
2/2 3 111 111 111 4 5776 2408 6107 6875 Sample Output H V D 02 20 A 00 22 H 01 11 21 V 10 11 12 D 02 11 20 A 00 11 22 H 22 V 12 22 D 03 11 12 30 A 00 21 22 33