/* package codechef; // don’t place package name! */
import java.util.;
import java.lang.;
import java.io.*;
/* Name of the class has to be “Main” only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{ int max=0;
// your code goes here
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
int a=sc.nextInt();
int q=sc.nextInt();
int ar[]=new int[a];
int qi[]=new int[q];
for(int i=0;i<a;i++)
ar[i]=sc.nextInt();
for(int j=0;j<q;j++)
qi[j]=sc.nextInt();
for(int i=0;i<q;i++)
{
int n=qi[i];
for(int j=0;j<n;j++)
{
if(ar[j]>max)
max=ar[j];
}
System.out.println(max);
}
}
}