#include using namespace std; using ll = long long; #define rep(i,n) for (int i=0;i<(int)(n);i++) int main(){ ll n,m,ek; cin>>n>>m>>ek; vector a(n); rep(i,n) cin>>a.at(i); sort(a.begin(),a.end()); ll ans=0; for(int i=0;im) break; ans=max(ans,tmpi); if(ek<=1) continue; for(int j=i;jm) break; ans=max(ans,tmpj); if(ek<=2) continue; for(int k=j;km) break; ans=max(ans,tmpk); if(ek<=3) continue; for(int l=k;lm) break; ans=max(ans,tmpl); if(ek<=4) continue; for(int o=l;om) break; ans=max(ans,tmpo); if(ek<=5) continue; for(int p=o;pm) break; ans=max(ans,tmpp); } } } } } } cout<