#include<stdio.h>
#include<string.h>
char A[100000], B[100000];
int S[100000];
int main()
{
int T, i;
scanf("%d",&T)
for(i=1; i<=T; i++)
{
memset(A,'\0',sizeof(A));
memset(B,'\0',sizeof(B));
memset(S,0,sizeof(S));
scanf("%s%s",A,B);
int len1, len2, j, a;
len1 = strlen(A);
len2 = strlen(B);
j = len1>=len2?len1-1:len2-1;
a = j+2;
printf("Case %d:\n",i);
printf("%s + %s = ",A,B);
for(; j>=0; j--)
{
S[j+1] += A[j]-'0' + B[j]-'0';
if(S[j+1]>9)
{
S[j] += S[j+1]/10;
S[j+1] = S[j+1]%10;
}
}
for(j=0; j<a; j++)
{
if(S[0]==0 && j<a-1)
printf("%d",S[j+1]);
if(S[0]!=0)
printf("%d",S[j]);
}
printf("\n");
}
}