import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args) throws IOException
{
Scanner sca = new Scanner(System.in);
// BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = sca.nextInt();
for(int i = 0; i < n; i++)
{
int[] num1 = new int[1024];
int[] num2 = new int[1024];
int[] ans = new int[1024];
int borrow = 0;
String str = sca.next();
String str2 = sca.next();
str = str + " " + str2;
char[] line = str.toCharArray();
int j = 0, k = 0;
int length,length1,length2;
while(line[j] != ' ' && j < line.length)
++j;
for(int l = j - 1; l >= 0; l--)
{
num1[k] = (int)line[l] - 48;
++k;
}
length1 = k;
k = 0;
++j;
int s = j;
j = line.length;
for(int l = j - 1; l >= s; l--)
{
num2[k] = (int)line [l] - 48;
++k;
}
length2 = k;
j = 0;
while(j < length1 && j < length2)
{
ans[j] = num1[j] + num2[j] + borrow;
borrow = ans[j] / 10;
ans[j] %= 10;
++j;
}
if(j >= length1)
{
while(j < length2)
{
ans[j] = num2[j] + borrow;
borrow = ans[j] / 10;
ans[j] %= 10;
++j;
}
}
if(j >= length2)
{
while(j < length1)
{
ans[j] = num1[j] + borrow;
borrow = ans[j] / 10;
ans[j] %= 10;
++j;
}
}
if(borrow == 1)
{
ans[j] = 1;
++j;
}
length = j;
while(ans[length - 1] == 0 && length > 1)
--length;
System.out.println("Case " + (i + 1) + ":");
for(j = length1 - 1; j >= 0; j--)
System.out.print(num1[j]);
System.out.print(" + ");
for(j = length2 - 1; j >= 0; j--)
System.out.print(num2[j]);
System.out.print(" = ");
for(j = length - 1; j >= 0; j--)
System.out.print(ans[j]);
System.out.println();
if(i != n - 1)
System.out.println();
}
}
}