#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define ll long long
#define ff first
#define ss second
using namespace std;

int f(vector < int > & v)
{
    int ans = 0;
    for(auto it : v)
    {
        if(it >= ans) ans++;
        else ans--;
    }
    return ans;
}
int main()
{
    FAST;
    int t; cin >> t;
    int n, k; cin >> n >> k;
    vector < int > v(n);
    for(int i = 0; i < n; i++) cin >> v[i];

    sort(begin(v), end(v));
    int a = f(v);
    sort(begin(v), end(v), greater < int > ());
    int b = f(v);

    if(abs(a) % 2 == abs(b) % 2) return cout << "-1\n", 0;

    while(true)
    {

    }
    return 0;
}