考点:排序,查找
#include<bits/stdc++.h>
using namespace std;
const int MAXSIZE=1001;
int main() {
int n;
while(cin>>n) {
set<int> s;
int x;
for(int i=0; i<n; i++) {
cin>>x;
s.insert(x);
}
int k,cnt=0;
cin>>k;
for(auto it=s.begin(); it!=s.end(); it++) {
cnt++;
if(cnt==k) {
cout<<*it<<endl;
}
}
}
return 0;
}