#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test;
  cin >> test;
  test++;
  while (test--) {
    string line;
    getline(cin, line);
    vector<string> result;
    istringstream iss(line);
    for (string s; iss >> s;) {
      result.push_back(s);
    }
    int count = 0;
    if (result.size() == 2) {
      for (string i : result) {
        count += stoi(i);
      }
      cout << count << endl;
    }
  }
  return 0;
}
