var toInt = x=>parseInt(x,10);
var toIntArr = arr=>arr.map(x=>toInt(x));
var abs = x=>x>0?x:-x;
function min(){var rest = arguments,val=rest[0];for(var i=1;i<rest.length;i++)if(rest[i]<val)val = rest[i];return val}
function max(){var rest = arguments,val=rest[0];for(var i=1;i<rest.length;i++)if(rest[i]>val)val = rest[i];return val}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
 
function Main(input){
	var input = input.split('\n');
	var nmq = input[0].split(' ');
	var n = toInt(nmq[0]);
	var m = toInt(nmq[1]);
	var q = toInt(nmq[2]);
	var lr = [];
	var pq = [];
	var ans = [];

	for(var i = 0; i < m; i++){
		lr[i] = toIntArr(input[i+1].split(' '));
	}
	for(var i = 0; i < q; i++){
		pq[i] = toIntArr(input[i+m+1].split(' '));
	}
	for(var i = 1; i <= n; i++){
		ans[i] = [];
	}

	lr.sort(function(a,b){
		return a[1]-b[1];
	})

	var x,y,z;
	for(var i = 1; i <= n; i++){
		x = lr.map(el=>el[1]);
		for(var j = 1; j <= n; j++){
			y = x.lastIndexOf(j);
			if(y>-1){
				ans[i][j] = y+1;
			}else{
				ans[i][j] = j===1? 0: ans[i][j-1];
			}
		}
		lr = lr.filter(function(el,index,arr){
			return el[0]===i? false: true;
		});
	}
	for(var i = 0; i < q; i++){
		console.log(ans[pq[i][0]][pq[i][1]]);
	}

}