#include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t, i; cin >> t; while (i!=t) { i+=1; string input; cin >> input; if ((int)input[0] == 1) { cout << (int)input[2] +(int)input[4] << endl; } else { cout << i << endl; } } return 0; }