1. 


/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem 10464 - Big Big Real Numbers
* Link:
*
* @author Miesel Christoph
* @author Seilbeck Robert
* @author Wolfram Andre
* @version 1.0, 05/18/2009
*
* Status : Accepted
* Runtime: 0.368
*/

import java.math.*;
import java.io.*;
import java.util.*;
public class BigBig
{


public static void main(String[] args) throws Exception
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(reader.readLine());
BigDecimal summand1;
BigDecimal summand2;
for(int i = 0; i<N; i++)
{
String line = reader.readLine();
StringTokenizer token = new StringTokenizer(line);
summand1 = new BigDecimal(token.nextToken());
summand2 = new BigDecimal(token.nextToken());
summand1 = summand1.add(summand2);
StringBuilder sb = new StringBuilder(summand1.toString());
for(int k = sb.length()-1; k>=0; k--)
{
if(sb.charAt(k)=='.')
{
sb.append(0);
break;
}
if(sb.charAt(k) == '0')
{
sb.deleteCharAt(k);
}
else break;

}
System.out.println(sb.toString());
}
}

}