#include
#include
using namespace std;
int main()
{
int N;
string a;
string b;
cin>>N;
int f=1,z=N;
int c[1000]={0};
while(N--)
{
cin>>a>>b;
int m,n;
m=a.length()-1 ;
n=b.length()-1;
int flag=0;
int i=0;
int j,k;
int h;
while(m>-1&&n>-1)
{
j=a[m]-'0';
k=b[n]-'0';
c[i]=(j+k+flag)%10;
flag=(j+k+flag)/10;
m--;
n--;
i++;
}
for(;m>-1;m--,i++)
{
j=a[m]-'0';
c[i]=(j+flag)%10;
flag=(j+flag)/10;
}
for(;n>-1;i++,n--)
{
k=b[n]-'0';
c[i]=(k+flag)%10;
flag=(k+flag)/10;
}
c[i]=flag;
for(int t=999;t>-1;t--)
{
if(c[t]!=0)
{
h=t;
break;
}
}
cout<<"Case "<
cout
for(;h>-1;h--)
cout<<c[h];
cout<<endl;
if(f<z)
cout<<endl; f++;
}
return 0;
}