import java.util.*;
import java.io.*;
public class Main {
private Scanner in = new Scanner(System.in);
public static void main(String [] args) {
new Main().run();
}
private void run() {
while (in.hasNext()) {
int n = in.nextInt();
int id = in.nextInt();
int num = in.nextInt();
int [] p = new int [num];
int [] t = new int [num];
for (int i = 0; i < num; i++) {
t[i] = p[i] = in.nextInt();
}
Arrays.sort(p);
int r = num % n;
int d = num / n;
int pos;
int min, max;
if (id < r) {
pos = id * (d + 1);
} else {
pos = r * (d + 1) + (id - r) * d;
}
min = p[pos];
id++;
if (id < r) {
pos = id * (d + 1);
} else {
pos = r * (d + 1) + (id - r) * d;
}
pos--;
max = p[pos];
for (int i = 0; i < num; i++) {
if (t[i] = min) {
System.out.println(t[i]);
break;
}
}
}
}
}