#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, t;
  cin >> t;
  while (t--) {
    cin >> a >> b;
    long long int i = b;
    while (i--) {
      a = a + 1;
    }
    printf("%lld\n", a);
  }
  return 0;
}
