// Arup Guha
// 12/10/2019
// Solution to 2019 UCF HS Online D2 Problem: Triforce

import java.util.*;

public class triforce {

	public static void main(String[] args) {
	
		Scanner stdin = new Scanner(System.in);
		int nC = stdin.nextInt();
		
		// Process each case.
		for (int loop=1; loop<=nC; loop++) {
			
			// Read in the parameters.
			int s = stdin.nextInt();
			int iter = stdin.nextInt();
			int cost = stdin.nextInt();
			
			// Pattern is just area of an equilateral triangle times (3/4)^iter.
			// Each time we "white out" 3/4 of what was previously black.
			double area = Math.pow(.75,iter)*s*s*Math.sqrt(3)/4;
			
			// Ta da!
			System.out.printf("Triforce #%d: %.2f\n", loop, area*cost);
		}
	}
}