// Arup Guha
// 6/5/2014
// Solution to 2008 UCF High School Programming Contest Problem: The Non_Orthogonal Structure of Tuscany

import java.util.*;
import java.io.*;

public class tower {

	final public static int LENGTH = 56;

	public static void main(String[] args) throws IOException {

		Scanner fin = new Scanner(new File("tower.in"));
		int numCases = fin.nextInt();

		// Key here is that we set up the triangle, use cosine inverse and convert to degrees.
		for (int loop=1; loop<=numCases; loop++)
			System.out.printf("Target #%d: %.1f degrees\n", loop, 180*Math.acos(fin.nextDouble()/LENGTH)/Math.PI);

		fin.close();
	}
}