#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;

int main(){
	freopen("assign.in","r",stdin);
	freopen("assign.out","w",stdout);
	
	std::ios::sync_with_stdio(0);
	int t;
	cin >> t;
	for(int a=1; a<=t; a++){
		int n,m,v;
		cin >> n >> m >> v;
//		for(int i=1; i<=m; i++){
//			
//		}
		cout << n+m+1;
	}
	
	return 0;
}
