import std.stdio;
import std.array;//split
import std.conv;//to
import std.string;//chomp
import std.bigint;

void main(){
    string[] input = split(readln());
    int n= to!int(input[0]);
    while(n--){
        BigInt a = BigInt(readln().chomp());
        BigInt b = BigInt(readln().chomp());
        writeln(a+b);
    }
}