// Arup Guha
// 2/8/2013
// Solution to 2013 HS Online Problem: Sinko

import java.util.*;

public class sinko {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int numCases = stdin.nextInt();

		// Go through all the cases.
		for (int loop=1; loop<=numCases; loop++) {

			// Get the input.
			int c = stdin.nextInt();
			int a = stdin.nextInt();
			int b = stdin.nextInt();

			// This sides must form a triangle AND the mast must be on the ship, not off in the water =)
			if (c >= a+b || a >= Math.sqrt(b*b+c*c)+1e-10 || b >= Math.sqrt(a*a+c*c)+1e-10) {
				System.out.println("Ship #"+loop+": Ali is sunk!");
			}
			
			// Law of Cosines works to solve the triangle...
			else {
				double cosC = (double)(a*a + b*b - c*c)/(2*a*b);
				double sinC = Math.sqrt(1 - cosC*cosC);
				double twoarea = a*b*sinC;
				double mast = twoarea/c;
				double left = Math.sqrt(a*a-mast*mast);
				double right = Math.sqrt(b*b-mast*mast);
				System.out.printf("Ship #%d: %.2f %.2f %.2f\n", loop, mast, left, right);
			}
		}
	}
}