import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; /** * @author avAnkyAnkit last modified @02-Feb-2018 @8:30:07 PM HourRank - TODO */ class q2 { public static void main(String[] args) throws Exception { int t = sc.nextInt(); while (t-- > 0) solve(); } // **SOLUTION** public static void solve() throws Exception { // your code goes here int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); System.out.println(a + b - c); } public static InputStreamReader r = new InputStreamReader(System.in); public static BufferedReader br = new BufferedReader(r); public static Scanner sc = new Scanner(System.in); }