1. 

/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem 11479 - Is this the easest problem
* Link: http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_onlinejudge&Itemid=8&category=26&page=show_problem&problem=2474
* @author Miesel Christoph
* @author Seilbeck Robert
* @author Wolfram Andre
* @version 1.1 21.04.2009
*
* Status : Accepted
* Runtime: 0.140
*/


import java.io.*;
import java.util.*;


public class Main
{
public static void main(String[] args) throws NumberFormatException,IOException
{
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();

for (int i = 1; i <= T; i++)
{


long[] triangle = new long[3];

for (int k = 0; k < 3; k++)
{
triangle[k] = sc.nextInt();
}

if (triangle[0] > 0 && triangle[1] > 0 && triangle[2] > 0)
{
if (triangle[0] < (triangle[1] + triangle[2]) && triangle[1] < (triangle[0] + triangle[2]) && triangle[2] < (triangle[1] + triangle[0]))
{
if (triangle[0] == triangle[1]
&& triangle[0] == triangle[2])
System.out.println("Case " + i + ": Equilateral");
else
{
if (triangle[0] == triangle[1] || triangle[0] == triangle[2] || triangle[1] == triangle[2])
System.out.println("Case " + i + ": Isosceles");
else
System.out.println("Case " + i + ": Scalene");
}
}
else
System.out.println("Case " + i + ": Invalid");

} else
System.out.println("Case " + i + ": Invalid");

}
}
}