#include<iostream>
#include<string>
using namespace std;
int main()
{
int size=0;
cin>>size;
/*char * p=new char[100];
char * q=new char[100];*/
string p="";
string q="";
int * result=new int[1001];
for(int l=0;l<size;l++)
{
cin>>p>>q;
string p_backup=p;
string q_backup=q;
int n=p.length();
int m=q.length();
int maxlength=n;
int span=n-m;
if(n<m)
{
string temp=p;
p=q;
q=temp;
maxlength=m;
span=m-n;
}
string blank="";
for(int i=0;i<span;i++)
blank+="0";
q=blank+q;
for(int i=0;i<maxlength;i++)
{
result[i]=(p[i]-'0') +(q[i]-'0');
}
for(int i=maxlength-1;i>0;i--)
{
if(result[i]>9) { result[i]-=10; result[i-1]+=1;}
}
cout<<"Case "<<l+1<<":"<<endl;
cout<<p_backup<<" "<<"+ "<<q_backup<<" "<<"= ";
if(result[0]>9) {result[0]-=10;cout<<1; for(int i=0;i<maxlength;i++) cout<<result[i]; }
else for(int i=0;i<maxlength;i++) cout<<result[i];
cout<<endl;
if(l<=size-2) cout<<endl;
}
}