// Arup Guha
// 7/27/2011
// Solution to BHCSI Contest Problem: Candy

import java.util.*;
import java.io.*;

public class candy {
	
	public static void main(String[] args) throws Exception {
		
		// Open the file.
		Scanner fin = new Scanner(new File("candy.in"));
		int numCases = fin.nextInt();
		
		// Go through each case.
		for (int i=0; i<numCases; i++) {
			
			// Get the pieces of candy for this case.
			int a = fin.nextInt();
			int b = fin.nextInt();
			int c = fin.nextInt();
			
			// Find the max.
			int max = a;
			if (b > max)
				max = b;
			if (c > max)
				max = c;
				
			// Output the answer.
			System.out.println(max);
		}
	}
}