#include<bits/stdc++.h> using namespace std; int main(){ long long int t,a[3]; while(cin>>t){ for(long long int i=1;i<=t;i++){ cin>>a[0]; cin>>a[1]; cin>>a[2]; sort(a,a+3); if(a[0]+a[1]<=a[2] or a[0]<=0 or a[1]<=0 or a[2]<=0)cout<<"Case "<<i<<": Invalid"<<endl; else if(a[0]==a[1] and a[1]==a[2])cout<<"Case "<<i<<": Equilateral"<<endl; else if(a[0]==a[1] or a[1]==a[2] or a[0]==a[2])cout<<"Case "<<i<<": Isosceles"<<endl; else cout<<"Case "<<i<<": Scalene"<<endl; } } }