#include
#include
using namespace std;
void Maths(string s1,string s2)
{
int i,j,x;
i=0;
while(i<s1.length())
{
x=s1[i]-s2[i];
if(x==-1)
x=s2[i]-s1[i];
string str=to_string(x);
s1.erase(i,1);
s1.insert(i,str);
i++;
}
cout<<s1;
}
int main()
{
int t;
cin>>t;
cout<<endl;
while(t>0)
{
string s1,s2;
cin>>s1>>s2;
Maths(s1,s2);
t–;
}
}