import java.io.*;
import java.util.*;


class Finder {
    
    public Finder() {
    }

    public int findValue(int first, int second, int index) {
	int valAtIndex = 0;
	
	// to fulfilled: compute real value of valAtIndex
	
	return valAtIndex;
    }
}

class Uniadd1 {

    public static void main(String[] args) {
	Locale.setDefault(Locale.ENGLISH);

	try {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    String line = "";
	    
	    line = br.readLine();
	    
	    int nb = Integer.parseInt(line);
	    Finder f = new Finder();
	    
	    for(int i=0;i<nb;i++) {
		line = br.readLine();
		String[] parts = line.split(" ");
		int first = Integer.parseInt(parts[0]);
		int second = Integer.parseInt(parts[1]);
		int index = Integer.parseInt(parts[2]);
		System.out.println(f.findValue(first, second, index));
	    }
	}
	catch(IOException e) {}
    }
}
