var
n,i : longint;
a,b,c : int64;
begin
readln(n);
for i :=1 to n do begin
readln(a,b,c);
if (a+b<=c) or (a+c<=b) or (b+c<=a) then writeln('Case ',i,': Invalid')
else
if (a=b) and (b=c) and (a=c) then writeln('Case ',i,': Equilateral')
else if (a=b) or (b=c) or (a=c) then
writeln('Case ',i,': Isosceles')
else
writeln('Case ',i,': Scalene');
end;
end.