import java.io.*;
import java.lang.*;
import java.util.*;
import java.math.*;

class etch
{

	public static void main(String[] args) throws Exception
	{
		(new etch()).go();
	}
	
	public void err(String s)
	{
		System.out.println("> "+s);
	}
	
	public static final double EPSILON = 0.0000000001;
	
	public void go() throws Exception
	{
		Scanner in = new Scanner(new File("etch.in"));
		int n = in.nextInt();
		in.nextLine();
		for(int i=0; i<n; i++)
		{
			String line = in.nextLine();
			String sparts[] = line.split(" ");
			double parts[] = new double[sparts.length];
			for(int j=0; j<5; j++)
			{
				parts[j] = Double.parseDouble(sparts[j]);
			}
			double f = (parts[1]-parts[0])/(parts[0]*parts[1]);
			double a = parts[2], b = parts[3], c = parts[4];
			double low = 0.0, high = 1000000.0;
			double t = 0.0, result = 0.0;
			
			while(low < high && Math.abs(f-result) > EPSILON)
			{
				t = (low+high)/2.0;
				result = a*t + b*(1-Math.exp(-1*c*t));
				
				if(f<result)
				{
					high = t;
				}
				else if(f==result)
				{
					break;
				}
				else //if(f>result)
				{
					low = t;
				}
			}
			
			System.out.println("Crystal #"+(i+1)+": "+String.format("%.2f", t)+"\n");
		}
	}

}