// Arup Guha
// 5/2/2014
// Solution to UCF HS Contest Problem: Anti-absolute Values

import java.util.*;
import java.io.*;

public class sponge {

	final public static double factor = 20.0/27;

	public static void main(String[] args) throws Exception {

		Scanner fin = new Scanner(new File("sponge.in"));

		// Process all cases - key here is that each level multiplies volume by 20/27...
		int numCases = fin.nextInt();
		for (int loop=1; loop<=numCases; loop++) {
			int level = fin.nextInt();
			int side = fin.nextInt();
			System.out.printf("Sponge #%d: %.3f\n", loop, (side*side*side*Math.pow(factor, level)));
		}
		fin.close();
	}
}