// Arup Guha
// 8/26/2016
// Alternate Solution to 2016 UCF Locals Problem: Majestic

import java.util.*;
import java.io.*;

public class majestic_arup {

	// All possible results.
	final public static String[] ANSWERS = {"zilch", "double", "double-double", "triple-double"};

	public static void main(String[] args) throws Exception {

		Scanner stdin = new Scanner(System.in);

		// Get # of players.
		int n = stdin.nextInt();

		// Try each case.
		for (int loop=0; loop<n; loop++) {

			int res = 0;

			// Read in statistics, update number of doubles, if necessary.
			int[] vals = new int[3];
			for (int i=0; i<3; i++) {
				vals[i] = stdin.nextInt();
				if (vals[i] >= 10) res++;
			}

			// Output results.
			System.out.println(vals[0]+" "+vals[1]+" "+vals[2]);
			System.out.println(ANSWERS[res]);
			System.out.println();
		}
	}
}
