a = input().split()
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
p = input().split()
for i in range(len(p)):
	p[i] = int(p[i])
q = p[::]
q.sort()
for _ in range(a[1]):
	inp = input().split()
	inp[0] = int(inp[0])
	inp[1] = int(inp[1])
	new = [0]*a[0]
	#print(new)
	for i in range(inp[0]-1, inp[1]):
		#print(q[i])
		new[p[i-inp[0]+1]-1] = q[i]
	#print(new)
	absnew = []
	for i in new:
		if i != 0:
			absnew.append(i)
	#print(absnew)
	for i in range(inp[0]-1, inp[1]):
		q[i] = absnew[i-inp[0]+1]
	#print(q)
print(q[a[2]-1])
