#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 1024
char c[MAX];
int add(char a[], char b[], int al, int bl)
{
int i = 0, j = 0, t =0;
memset(c, 0, MAX);
for (i = al-1, j = bl-1;j >= 0 ; --i, --j, ++t)
c[t] = (a[i]-'0') + (b[j] - '0');
for (;i >= 0; --i, ++t)
c[t] = a[i]-'0';
for (i = 0; i <= t; ++i)
{
c[i+1] += c[i]/10;
c[i] = c[i]%10;
}
if (c[t])
t++;
return t;
}
int main(void)
{
int i = 1, n, al, bl,t;
char a[MAX], b[MAX];
scanf("%d", &n);
for(;i <= n; ++i)
{
scanf("%s%s", a, b);
printf("Case %d:\n%s + %s = ", i, a, b);
al = strlen(a);
bl = strlen(b);
t = (al > bl?add(a, b, al, bl):add(b, a,bl,al));
for (t--; t >= 0; --t)
printf("%d", c[t]);
printf("\n");
if (i < n)
printf("\n");
}
return 0;
}