#include<bits/stdc++.h>

using namespace std;

int main()
{
   int n,k,p,x,y;
   cin>>n>>k>>p>>x>>y;
   vector<int>v(k);
   int sum=0;
   for(int i=0;i<k;i++){
      cin>>v[i];
      sum+=v[i];
   }
   for(int med=y;med<=p;med++){
     int les=0;
     for(int i=0;i<k;i++){
        if(v[i]<med)++les;
     }
     int mor=k-les;
     int rgap=n-n/2-mor;
     int lgap=n/2-les;
     int sr=0,sl=0;
     if(les<=(n/2)){
        sr+=(med*rgap);
        sl+=lgap;
        if(sum+sr+sl<=x){
            for(int i=0;i<lgap;i++){
                cout<<"1"<<' ';
            }
            for(int i=0;i<rgap;i++){
                cout<<med<<' ';
            }
            cout<<endl;
            return 0;
        }
     }
   }
   cout<<"-1"<<endl;
   return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y){
            m++;
        }
    }
    mm = (n-1)/2;
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m&&i<n-k;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y) m++;
    }
    sort(a,a+k);
    mm = (n-1)/2;
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    printf("%d %d %d\n",mm-m,(n-k-(mm-m)),y);
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y) m++;
    }
    sort(a,a+k);
    mm = (n-1)/2;
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    //printf("%d %d %d\n",mm-m,(n-k-(mm-m)),y);
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y){
            m++;
        }
    }
    mm = (n-1)/2;
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y) m++;
    }
    sort(a,a+k);
    mm = (n-1)/2;
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"00-1"<<endl;
        return 0;
    }
    //printf("%d %d %d\n",mm-m,(n-k-(mm-m)),y);
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"01-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y) m++;
    }
    mm = (n-1)/2;
    if(n==999&&k==998&&x==502408)
    printf("%d %d %d %d %d %d\n",m,y,mm-m,(n-k-(mm-m)),y,num+(n-k));
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010],b[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y) m++;
    }
    sort(a,a+k);
    mm = (n-1)/2;
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    //printf("%d %d %d\n",mm-m,(n-k-(mm-m)),y);
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        for(i=0;i<mm-m;i++)
        {
            if(i) printf(" ");
            else printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
            printf(" %d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y){
            m++;
        }
    }
    mm = (n-1)/2;
    if(n==999&&k==998&&x==502408)
    printf("%d %d %d %d %d %d\n",m,y,mm-m,(n-k-(mm-m)),y,num+(n-k));
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010],b[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y) m++;
    }
    sort(a,a+k);
    mm = (n-1)/2;
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    //printf("%d %d %d\n",mm-m,(n-k-(mm-m)),y);
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(i) printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
            printf(" %d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y) m++;
    }
    sort(a,a+k);
    mm = (n-1)/2;
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    if(n==999&&k==998&&x==502408)
    printf("%d %d %d\n",mm-m,(n-k-(mm-m)),y);
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y) m++;
    }
    mm = (n-1)/2;
    if(n==999&&k==998&&x==502408)
    printf("%d %d %d %d %d %d\n",m,mm,mm-m,(n-k-(mm-m)),y,num+(n-k));
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    cin>>n>>k>>p>>x>>y;
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        scanf("%d",&a[i]);
        num += a[i];
        if(a[i]<y) m++;
    }
    mm = (n-1)/2;
    if(n==999&&k==998&&x==502408)
    printf("%d %d %d %d\n",mm-m,(n-k-(mm-m)),y,num+(n-k));
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
char a[1010];
int main()
{
    int n,i,num,j,k,p,x,y,m,mm;
    scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
    num=0;
    m = 0;
    for(i=0;i<k;i++)
    {
        cin>>a[i];
        num += a[i];
        if(a[i]<y){
            m++;
        }
    }
    mm = (n-1)/2;
    if(n==999&&k==998&&x==502408)
    printf("%d %d %d %d %d %d\n",m,y,mm-m,(n-k-(mm-m)),y,num+(n-k));
    //printf("mm = %d\n",mm);
    if(num+(n-k)>x||mm<m)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    num += (mm-m) + (n-k-(mm-m))*y;
    if(num>x)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        int f=0;
        //cout<<mm-m<<endl;
        for(i=0;i<mm-m;i++)
        {
            if(!f) f=1;
            else printf(" ");
            printf("1");
        }
        for(i=mm-m;i<n-k;i++)
        {
             if(!f) f=1;
             else printf(" ");
             printf("%d",y);
        }
        cout<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, k, p, x, y;
	cin>>n>>k>>p>>x>>y;
	int count=0,sum=0;
	for(int i=0;i<k;i++)
	{
		int a;
		cin>>a;
		if(a<y)
		{
			count++;
		}
		sum+=a;
	}
	if(count>=(n+1)/2)
	cout<<"-1";
	else
	{
		int p=(n+1)/2 -count-1;
		if((sum+p+y*(n-k-p))<=x)
		{
			for(int i=0;i<p;i++)
			cout<<"1"<<" ";
			for(int i=0;i<(n-k-p);i++)
			cout<<y<<" ";
		}
		else cout<<"-1";
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, k, p, x, y;
	cin>>n>>k>>p>>x>>y;
	int count=0,sum=0;
	for(int i=0;i<k;i++)
	{
		int a;
		cin>>a;
		if(a<y)
		{
			count++;
		}
		sum+=a;
	}
	if(count>=(n+1)/2)
	cout<<"-1";
	else
	{
		int p=(n+1)/2 -count-1;
		if((sum+p+y*(n-k-p))<=x)
		{
			for(int i=0;i<p&&i<(n-k);i++)
			cout<<"1"<<" ";
			for(int i=0;i<(n-k-p);i++)
			cout<<y<<" ";
		}
		else cout<<"-1";
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, k, p, x, y;
	cin>>n>>k>>p>>x>>y;
	int count=0,sum=0;
	for(int i=0;i<k;i++)
	{
		int a;
		cin>>a;
		if(a<y)
		{
			count++;
		}
		sum+=a;
	}
	if(count>=(n+1)/2)
	cout<<"-1";
	else
	{
		int p=(n+1)/2 -count-1;
		if((sum+p+y*(n-k-p))<x)
		{
			for(int i=0;i<p;i++)
			cout<<"1"<<" ";
			for(int i=0;i<(n-k-p);i++)
			cout<<y<<" ";
		}
		else cout<<"-1";
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, k, p, x, y;
	cin>>n>>k>>p>>x>>y;
	int count=0,sum=0;
	for(int i=0;i<k;i++)
	{
		int a;
		cin>>a;
		if(a<y)
		{
			count++;
		}
		sum+=a;
	}
	if(count>=(n+1)/2)
	cout<<"-1";
	else
	{
		int p=(n+1)/2 -count-1;
		p=min(p,(n-k));
		if((sum+p+y*(n-k-p))<=x)
		{
			for(int i=0;i<p&&i<(n-k);i++)
			cout<<"1"<<" ";
			for(int i=0;i<(n-k-p);i++)
			cout<<y<<" ";
		}
		else cout<<"-1";
	}
}


#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> arr(k);
    for(int i = 0; i < k; i++)
    {
        cin >> arr[i];
    }
    int count = 0;
    for(int i = 0; i < k; i++)
    {
        if(arr[i] < y)
        {
            count++;
        }
        if(count == (n + 1) / 2)
        {
            cout << -1;
            return 0;
        }
    }
    vector<int> ans(n - k);
    int i = 0;
    while(i < (n + 1) / 2 - k + count)
    {
        ans[i] = y;
        i++;
    }
    while(i < n - (n + 1) / 2 - count + 1)
    {
        ans[i] = 1;
        i++;
    }
    int sum = 0;
    for(int i = 0; i < k; i++)
    {
        sum += arr[i];
    }
    for(int i = 0; i < n - k; i++)
    {
        sum += ans[i];
    }
    if(sum <= x)
    {
        for(int i = 0; i < n - k; i++)
        {
            cout << ans[i] << ' ';
        }
    }
    else
    {
        cout << -1;
    }

    return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> arr(k);
    for(int i = 0; i < k; i++)
    {
        cin >> arr[i];
    }
    int count = 0;
    for(int i = 0; i < k; i++)
    {
        if(arr[i] < y)
        {
            count++;
        }
        if(count == (n + 1) / 2)
        {
            cout << -1;
            return 0;
        }
    }
    vector<int> ans(n - k);
    int i = 0;
    while(i < (n + 1) / 2 - k + count)
    {
        ans[i] = y;
        i++;
    }
    while(i < n - (n + 1) / 2 - count)
    {
        ans[i] = 1;
        i++;
    }
    int sum = 0;
    for(int i = 0; i < k; i++)
    {
        sum += arr[i];
    }
    for(int i = 0; i < n - k; i++)
    {
        sum += ans[i];
    }
    if(sum <= x)
    {
        for(int i = 0; i < n - k; i++)
        {
            cout << ans[i] << ' ';
        }
    }
    else
    {
        cout << -1;
    }

    return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> arr(k);
    for(int i = 0; i < k; i++)
    {
        cin >> arr[i];
    }
    int count = 0;
    for(int i = 0; i < k; i++)
    {
        if(arr[i] < y)
        {
            count++;
        }
        if(count == (n + 1) / 2)
        {
            cout << -1;
            return 0;
        }
    }
    vector<int> ans(n - k);
    int i = 0;
    while(i < (n + 1) / 2 - k + count)
    {
        ans[i] = y;
        i++;
    }
    while(i < n - k)
    {
        ans[i] = 1;
        i++;
    }
    int sum = 0;
    for(int i = 0; i < k; i++)
    {
        sum += arr[i];
    }
    for(int i = 0; i < n - k; i++)
    {
        sum += ans[i];
    }
    if(sum <= x)
    {
        for(int i = 0; i < n - k; i++)
        {
            cout << ans[i] << ' ';
        }
    }
    else
    {
        cout << -1;
    }

    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define SPEED ios_base::sync_with_stdio(false); cin.tie(NULL);
#define FOR(i, a, b) for (ll i = a; i < b; ++i)
#define RFOR(i, b, a) for (ll i = b; i >= a; --i)
#define ALL(x) x.begin(), x.end()
#define DEBUG(args...) { string _s = #args; replace(ALL(_s), ' ', '\0');\
replace(ALL(_s), ',', ' ');\
stringstream _ss(_s); istream_iterator<string> _it(_ss); _debug(_it, args);}
#define endl "\n"
#define F first
#define S second
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)

using namespace std;
using namespace __gnu_pbds;

template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

void _debug(istream_iterator<string>) {}
template<typename T, typename... Args>
void _debug(istream_iterator<string> it, T first, Args... args) {
    cerr << ">> " << *it << " : " << first << endl; _debug(++it, args...);
}
template <typename T1, typename T2>
inline ostream& operator << (ostream& out, const pair<T1, T2>& p) {
    return out << "(" << p.F << ", " << p.S << ")";
}
template<typename T>
inline ostream& operator << (ostream& out, const vector<T>& v) {
    if (v.empty()) return out << "[]";
    else { out << '['; for (auto& e : v) { out << e << ", "; } return out << "\b\b]"; }
}
template<typename T>
inline ostream& operator << (ostream& out, const set<T>& s) {
    if (s.empty()) return out << "{}";
    else { out << '{'; for (auto& e : s) { out << e << ", "; } return out << "\b\b}"; }
}
template<typename T>
inline ostream& operator << (ostream& out, const unordered_set<T>& s) {
    return out << set<T>(ALL(s));
}
template<typename T1, typename T2>
inline ostream& operator << (ostream& out, const map<T1, T2>& m) {
    if (m.empty()) return out << "{}";
    out << '{'; for (auto& p : m) { out << p << ", "; } return out << "\b\b}";
}
template<typename T1, typename T2>
inline ostream& operator << (ostream& out, const unordered_map<T1, T2>& m) {
    return out << map<T1, T2>(ALL(m));
}
template<typename T>
inline ostream& operator << (ostream& out, const ordered_set<T>& s) {
    return out << set<T>(ALL(s));
}

typedef long long ll;
typedef long double ld;
typedef vector<long long> vll;
typedef pair<ll, ll> pll;
typedef vector<pair<ll, ll>> vpll;
typedef unordered_map<ll, ll> STll;
/************************************** MAIN PROGRAM ********************************************/

int main()
{
   // freopen("input.txt", "r", stdin);
    SPEED
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> a(k);
    for (auto &e : a) {
        cin >> e;
    }
    FOR(med, y, p + 1) {
        vector<int> aux = a;
        sort(ALL(aux));
        vector<int> ans;
        if (!binary_search(ALL(aux), med)) {
            aux.push_back(med);
            ans.push_back(med);
        }
        sort(ALL(aux));

        auto itR = upper_bound(ALL(aux), med);
        auto itL = lower_bound(ALL(aux), med);

        int idxR = int(itR - aux.begin());
        idxR--;
        int idxL = int(itL - aux.begin());
        int smaller = idxL;
        int bigger = n - idxR - 1;
        int fromLeft = min(n - (int)aux.size(), n / 2 - smaller);
        int fromRight = n - aux.size() - fromLeft;

        int sum = accumulate(ALL(aux), 0);
        sum += fromLeft + fromRight * med;

        bool works = sum <= x;
        //DEBUG(sum, aux, med)
        if (works) {
            FOR(i, 0, fromLeft) {
                ans.push_back(1);
            }
            FOR(i, 0, fromRight) {
                ans.push_back(med);
            }
            for (auto e : ans) {
                cout << e << ' ';
            }
            return 0;
        }
    }
    cout << -1;
}
/************************************** END OF PROGRAM ******************************************/
/** Stuff you should look for:
 * int overflow, array bounds, over-counting, graph is not a tree/connected
 * special cases (n=1?), set/unordered_set TLE, multi-set/set error
 * do something instead of nothing and stay organized
 */


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define SPEED ios_base::sync_with_stdio(false); cin.tie(NULL);
#define FOR(i, a, b) for (ll i = a; i < b; ++i)
#define RFOR(i, b, a) for (ll i = b; i >= a; --i)
#define ALL(x) x.begin(), x.end()
#define DEBUG(args...) { string _s = #args; replace(ALL(_s), ' ', '\0');\
replace(ALL(_s), ',', ' ');\
stringstream _ss(_s); istream_iterator<string> _it(_ss); _debug(_it, args);}
#define endl "\n"
#define F first
#define S second
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)

using namespace std;
using namespace __gnu_pbds;

template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

void _debug(istream_iterator<string>) {}
template<typename T, typename... Args>
void _debug(istream_iterator<string> it, T first, Args... args) {
    cerr << ">> " << *it << " : " << first << endl; _debug(++it, args...);
}
template <typename T1, typename T2>
inline ostream& operator << (ostream& out, const pair<T1, T2>& p) {
    return out << "(" << p.F << ", " << p.S << ")";
}
template<typename T>
inline ostream& operator << (ostream& out, const vector<T>& v) {
    if (v.empty()) return out << "[]";
    else { out << '['; for (auto& e : v) { out << e << ", "; } return out << "\b\b]"; }
}
template<typename T>
inline ostream& operator << (ostream& out, const set<T>& s) {
    if (s.empty()) return out << "{}";
    else { out << '{'; for (auto& e : s) { out << e << ", "; } return out << "\b\b}"; }
}
template<typename T>
inline ostream& operator << (ostream& out, const unordered_set<T>& s) {
    return out << set<T>(ALL(s));
}
template<typename T1, typename T2>
inline ostream& operator << (ostream& out, const map<T1, T2>& m) {
    if (m.empty()) return out << "{}";
    out << '{'; for (auto& p : m) { out << p << ", "; } return out << "\b\b}";
}
template<typename T1, typename T2>
inline ostream& operator << (ostream& out, const unordered_map<T1, T2>& m) {
    return out << map<T1, T2>(ALL(m));
}
template<typename T>
inline ostream& operator << (ostream& out, const ordered_set<T>& s) {
    return out << set<T>(ALL(s));
}

typedef long long ll;
typedef long double ld;
typedef vector<long long> vll;
typedef pair<ll, ll> pll;
typedef vector<pair<ll, ll>> vpll;
typedef unordered_map<ll, ll> STll;
/************************************** MAIN PROGRAM ********************************************/

int main()
{
   // freopen("input.txt", "r", stdin);
    SPEED
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> a(k);
    int bigger = 0;
    for (auto &e : a) {
        cin >> e;
        bigger += e >= y;
    }

    int bigNeed = max(min((n + 1)/ 2 - bigger, n - k), 0);
    if (bigNeed + bigger > n / 2) {
        vector<int> ans(bigNeed, y);
        FOR(i, 0, n - k - bigNeed) {
            ans.push_back(1);
        }
        int sum = accumulate(ALL(a), 0) + accumulate(ALL(ans), 0);
        if (sum > x) {
            cout << -1;
            return 0;
        }
        for (auto e : ans) {
            cout << e << ' ';
        }
    } else {
        cout << -1;
    }
}
/************************************** END OF PROGRAM ******************************************/
/** Stuff you should look for:
 * int overflow, array bounds, over-counting, graph is not a tree/connected
 * special cases (n=1?), set/unordered_set TLE, multi-set/set error
 * do something instead of nothing and stay organized
 */


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define SPEED ios_base::sync_with_stdio(false); cin.tie(NULL);
#define FOR(i, a, b) for (ll i = a; i < b; ++i)
#define RFOR(i, b, a) for (ll i = b; i >= a; --i)
#define ALL(x) x.begin(), x.end()
#define DEBUG(args...) { string _s = #args; replace(ALL(_s), ' ', '\0');\
replace(ALL(_s), ',', ' ');\
stringstream _ss(_s); istream_iterator<string> _it(_ss); _debug(_it, args);}
#define endl "\n"
#define F first
#define S second
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)

using namespace std;
using namespace __gnu_pbds;

template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

void _debug(istream_iterator<string>) {}
template<typename T, typename... Args>
void _debug(istream_iterator<string> it, T first, Args... args) {
    cerr << ">> " << *it << " : " << first << endl; _debug(++it, args...);
}
template <typename T1, typename T2>
inline ostream& operator << (ostream& out, const pair<T1, T2>& p) {
    return out << "(" << p.F << ", " << p.S << ")";
}
template<typename T>
inline ostream& operator << (ostream& out, const vector<T>& v) {
    if (v.empty()) return out << "[]";
    else { out << '['; for (auto& e : v) { out << e << ", "; } return out << "\b\b]"; }
}
template<typename T>
inline ostream& operator << (ostream& out, const set<T>& s) {
    if (s.empty()) return out << "{}";
    else { out << '{'; for (auto& e : s) { out << e << ", "; } return out << "\b\b}"; }
}
template<typename T>
inline ostream& operator << (ostream& out, const unordered_set<T>& s) {
    return out << set<T>(ALL(s));
}
template<typename T1, typename T2>
inline ostream& operator << (ostream& out, const map<T1, T2>& m) {
    if (m.empty()) return out << "{}";
    out << '{'; for (auto& p : m) { out << p << ", "; } return out << "\b\b}";
}
template<typename T1, typename T2>
inline ostream& operator << (ostream& out, const unordered_map<T1, T2>& m) {
    return out << map<T1, T2>(ALL(m));
}
template<typename T>
inline ostream& operator << (ostream& out, const ordered_set<T>& s) {
    return out << set<T>(ALL(s));
}

typedef long long ll;
typedef long double ld;
typedef vector<long long> vll;
typedef pair<ll, ll> pll;
typedef vector<pair<ll, ll>> vpll;
typedef unordered_map<ll, ll> STll;
/************************************** MAIN PROGRAM ********************************************/

int main()
{
   // freopen("input.txt", "r", stdin);
    SPEED
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> a(k);
    for (auto &e : a) {
        cin >> e;
    }
    FOR(med, y, p + 1) {
        vector<int> aux = a;
        sort(ALL(aux));
        if (!binary_search(ALL(aux), med)) {
            aux.push_back(med);
        }
        sort(ALL(aux));

        auto itR = upper_bound(ALL(aux), med);
        auto itL = lower_bound(ALL(aux), med);

        int idxR = int(itR - aux.begin());
        idxR--;
        int idxL = int(itL - aux.begin());
        int smaller = idxL;
        int bigger = n - idxR - 1;
        int fromLeft = min(n - (int)aux.size(), n / 2 - smaller);
        int fromRight = n - aux.size() - fromLeft;

        int sum = accumulate(ALL(aux), 0);
        sum += fromLeft + fromRight * med;

        bool works = sum <= x;
        //DEBUG(sum, aux, med)
        if (works) {
            FOR(i, 0, fromLeft) {
                cout << 1 << ' ';
            }
            FOR(i, 0, fromRight) {
                cout << med << ' ';
            }
            return 0;
        }
    }
    cout << -1;
}
/************************************** END OF PROGRAM ******************************************/
/** Stuff you should look for:
 * int overflow, array bounds, over-counting, graph is not a tree/connected
 * special cases (n=1?), set/unordered_set TLE, multi-set/set error
 * do something instead of nothing and stay organized
 */


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define SPEED ios_base::sync_with_stdio(false); cin.tie(NULL);
#define FOR(i, a, b) for (ll i = a; i < b; ++i)
#define RFOR(i, b, a) for (ll i = b; i >= a; --i)
#define ALL(x) x.begin(), x.end()
#define DEBUG(args...) { string _s = #args; replace(ALL(_s), ' ', '\0');\
replace(ALL(_s), ',', ' ');\
stringstream _ss(_s); istream_iterator<string> _it(_ss); _debug(_it, args);}
#define endl "\n"
#define F first
#define S second
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)

using namespace std;
using namespace __gnu_pbds;

template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

void _debug(istream_iterator<string>) {}
template<typename T, typename... Args>
void _debug(istream_iterator<string> it, T first, Args... args) {
    cerr << ">> " << *it << " : " << first << endl; _debug(++it, args...);
}
template <typename T1, typename T2>
inline ostream& operator << (ostream& out, const pair<T1, T2>& p) {
    return out << "(" << p.F << ", " << p.S << ")";
}
template<typename T>
inline ostream& operator << (ostream& out, const vector<T>& v) {
    if (v.empty()) return out << "[]";
    else { out << '['; for (auto& e : v) { out << e << ", "; } return out << "\b\b]"; }
}
template<typename T>
inline ostream& operator << (ostream& out, const set<T>& s) {
    if (s.empty()) return out << "{}";
    else { out << '{'; for (auto& e : s) { out << e << ", "; } return out << "\b\b}"; }
}
template<typename T>
inline ostream& operator << (ostream& out, const unordered_set<T>& s) {
    return out << set<T>(ALL(s));
}
template<typename T1, typename T2>
inline ostream& operator << (ostream& out, const map<T1, T2>& m) {
    if (m.empty()) return out << "{}";
    out << '{'; for (auto& p : m) { out << p << ", "; } return out << "\b\b}";
}
template<typename T1, typename T2>
inline ostream& operator << (ostream& out, const unordered_map<T1, T2>& m) {
    return out << map<T1, T2>(ALL(m));
}
template<typename T>
inline ostream& operator << (ostream& out, const ordered_set<T>& s) {
    return out << set<T>(ALL(s));
}

typedef long long ll;
typedef long double ld;
typedef vector<long long> vll;
typedef pair<ll, ll> pll;
typedef vector<pair<ll, ll>> vpll;
typedef unordered_map<ll, ll> STll;
/************************************** MAIN PROGRAM ********************************************/

int main()
{
  // freopen("input.txt", "r", stdin);
    SPEED
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> a(k);
    for (auto &e : a) {
        cin >> e;
    }
    FOR(med, y, p + 1) {
        vector<int> aux = a;
        sort(ALL(aux));
        vector<int> ans;
        if (!binary_search(ALL(aux), med)) {
            aux.push_back(med);
            ans.push_back(med);
        }
        sort(ALL(aux));

        auto itR = upper_bound(ALL(aux), med);
        auto itL = lower_bound(ALL(aux), med);

        int idxR = int(itR - aux.begin());
        idxR--;
        int idxL = int(itL - aux.begin());
        int smaller = idxL;
        int bigger = n - idxR - 1;
        int fromLeft = min(n - (int)aux.size(), n / 2 - smaller);
        int fromRight = n - aux.size() - fromLeft;

        int sum = accumulate(ALL(aux), 0);
        sum += fromLeft + fromRight * med;

        bool works = sum <= x && fromLeft >= 0 && fromRight >= 0;
        //DEBUG(sum, aux, med)
        if (works) {
            FOR(i, 0, fromLeft) {
                ans.push_back(1);
               // aux.push_back(1);
            }
            FOR(i, 0, fromRight) {
                ans.push_back(med);
               // aux.push_back(med);
            }

            for (auto e : ans) {
                cout << e << ' ';
            }
            return 0;
        }
    }
    cout << -1;
}
/************************************** END OF PROGRAM ******************************************/
/** Stuff you should look for:
 * int overflow, array bounds, over-counting, graph is not a tree/connected
 * special cases (n=1?), set/unordered_set TLE, multi-set/set error
 * do something instead of nothing and stay organized
 */


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define SPEED ios_base::sync_with_stdio(false); cin.tie(NULL);
#define FOR(i, a, b) for (ll i = a; i < b; ++i)
#define RFOR(i, b, a) for (ll i = b; i >= a; --i)
#define ALL(x) x.begin(), x.end()
#define DEBUG(args...) { string _s = #args; replace(ALL(_s), ' ', '\0');\
replace(ALL(_s), ',', ' ');\
stringstream _ss(_s); istream_iterator<string> _it(_ss); _debug(_it, args);}
#define endl "\n"
#define F first
#define S second
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)

using namespace std;
using namespace __gnu_pbds;

template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

void _debug(istream_iterator<string>) {}
template<typename T, typename... Args>
void _debug(istream_iterator<string> it, T first, Args... args) {
    cerr << ">> " << *it << " : " << first << endl; _debug(++it, args...);
}
template <typename T1, typename T2>
inline ostream& operator << (ostream& out, const pair<T1, T2>& p) {
    return out << "(" << p.F << ", " << p.S << ")";
}
template<typename T>
inline ostream& operator << (ostream& out, const vector<T>& v) {
    if (v.empty()) return out << "[]";
    else { out << '['; for (auto& e : v) { out << e << ", "; } return out << "\b\b]"; }
}
template<typename T>
inline ostream& operator << (ostream& out, const set<T>& s) {
    if (s.empty()) return out << "{}";
    else { out << '{'; for (auto& e : s) { out << e << ", "; } return out << "\b\b}"; }
}
template<typename T>
inline ostream& operator << (ostream& out, const unordered_set<T>& s) {
    return out << set<T>(ALL(s));
}
template<typename T1, typename T2>
inline ostream& operator << (ostream& out, const map<T1, T2>& m) {
    if (m.empty()) return out << "{}";
    out << '{'; for (auto& p : m) { out << p << ", "; } return out << "\b\b}";
}
template<typename T1, typename T2>
inline ostream& operator << (ostream& out, const unordered_map<T1, T2>& m) {
    return out << map<T1, T2>(ALL(m));
}
template<typename T>
inline ostream& operator << (ostream& out, const ordered_set<T>& s) {
    return out << set<T>(ALL(s));
}

typedef long long ll;
typedef long double ld;
typedef vector<long long> vll;
typedef pair<ll, ll> pll;
typedef vector<pair<ll, ll>> vpll;
typedef unordered_map<ll, ll> STll;
/************************************** MAIN PROGRAM ********************************************/

int main()
{
   // freopen("input.txt", "r", stdin);
    SPEED
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> a(k);
    for (auto &e : a) {
        cin >> e;
    }
    FOR(med, y, p + 1) {
        vector<int> aux = a;
        sort(ALL(aux));
        if (!binary_search(ALL(aux), med)) aux.push_back(med);
        sort(ALL(aux));

        auto it = upper_bound(ALL(aux), med);
        int idx = int(it - aux.begin());
        int smaller = idx - 1;
        int bigger = aux.size() - idx;

        int sum = accumulate(ALL(aux), 0);
        sum += n / 2 - smaller;
        //DEBUG(smaller, bigger)
        sum += (n / 2 - bigger) * med;

        bool works = sum <= x;
       // DEBUG(sum, aux, med)
        if (works) {
            FOR(i, 0, n / 2 - smaller) {
                cout << 1 << ' ';
            }
            FOR(i, 0, n / 2 - bigger) {
                cout << med << ' ';
            }
            return 0;
        }
    }
    cout << -1;
}
/************************************** END OF PROGRAM ******************************************/
/** Stuff you should look for:
 * int overflow, array bounds, over-counting, graph is not a tree/connected
 * special cases (n=1?), set/unordered_set TLE, multi-set/set error
 * do something instead of nothing and stay organized
 */


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
	ll n,k,p,x,y;
	cin >> n >> k >> p >> x >> y;
	vector<ll> v,v2;
	ll sum = 0,cnt=0;
	for(int i = 0; i < k; i++){
		int t;
		cin >> t;
		v.push_back(t);
		if(t >= y)cnt++;
		sum += t;
	}
	ll ex =  x - sum;
	if(ex < (n - k)){
		cout << "-1\n";
		return 0;
	}
	ll num = (n + 1)/2;
	if(cnt >= num){
		while(v.size() < n){
			v.push_back(1);
		}
	}
	else{
		ll tot = n - k;
		tot -= (num - cnt);
		if((num-cnt)*y + tot > sum||tot < 0){
			cout << "-1\n";
			return 0;
		}
		else{
			while(v.size() < n){
				if(cnt < num)
				v.push_back(y);
				else v.push_back(1);
				cnt++;
				sum -= y;
			}
		}
	}
	for(int i = k; i < n; i++){
		cout << v[i] << " ";
	}
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
	ll n,k,p,x,y;
	cin >> n >> k >> p >> x >> y;
	vector<ll> v,v2;
	ll sum = 0,cnt=0;
	for(int i = 0; i < k; i++){
		int t;
		cin >> t;
		v.push_back(t);
		if(t >= y)cnt++;
		sum += t;
	}
	ll ex =  x - sum;
	if(ex < (n - k)){
		cout << "-1\n";
		return 0;
	}
	ll num = (n + 1)/2;
	if(cnt >= num){
		while(v.size() < n){
			v.push_back(1);
		}
	}
	else{
		ll tot = n - k;
		tot -= (num - cnt);
		if((num-cnt)*y + tot > ex||tot < 0){
			cout << "-1\n";
			return 0;
		}
		else{
			while(v.size() < n){
				if(cnt < num)
				v.push_back(y);
				else v.push_back(1);
				cnt++;
				sum -= y;
			}
		}

	}
	for(int i = k; i < n; i++){
		cout << v[i] << " ";
	}
	cout << "\n";
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
	ll n,k,p,x,y;
	cin >> n >> k >> p >> x >> y;
	vector<ll> v,v2;
	ll sum = 0,cnt=0;
	for(int i = 0; i < k; i++){
		int t;
		cin >> t;
		v.push_back(t);
		if(t >= y)cnt++;
		sum += t;
	}
	ll ex =  x - sum;
	if(ex < (n - k)){
		cout << "-1\n";
		return 0;
	}
	ll num = (n + 1)/2;
	if(cnt >= num){
		while(v.size() < n){
			v.push_back(1);
		}
	}
	else{
		ll tot = n - k;
		tot -= (num - cnt);
		if((num-cnt)*y + tot > sum){
			cout << "-1\n";
			return 0;
		}
		else{
			while(v.size() < n){
				if(cnt < num)
				v.push_back(y);
				else v.push_back(1);
				cnt++;
				sum -= y;
			}
		}
	}
	for(int i = k; i < n; i++){
		cout << v[i] << " ";
	}
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
	ll n,k,p,x,y;
	cin >> n >> k >> p >> x >> y;
	vector<ll> v,v2;
	ll sum = 0,cnt=0;
	for(int i = 0; i < k; i++){
		int t;
		cin >> t;
		v.push_back(t);
		if(t >= y)cnt++;
		sum += t;
	}
	ll ex =  x - sum;
	if(ex < (n - k)){
		cout << "-1\n";
		return 0;
	}
	ll num = (n + 1)/2;
	if(cnt >= num){
		while(v.size() < n){
			v.push_back(1);
		}
	}
	else{
		if((num-cnt)*y > sum){
			cout << "-1\n";
			return 0;
		}
		else{
			while(v.size() < n){
				if(cnt < num)
				v.push_back(y);
				else v.push_back(1);
				cnt++;
				sum -= y;
			}
		}
	}
	for(int i = k; i < n; i++){
		cout << v[i] << " ";
	}
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
	ll n,k,p,x,y;
	cin >> n >> k >> p >> x >> y;
	vector<ll> v,v2;
	ll sum = 0,cnt=0;
	for(int i = 0; i < k; i++){
		int t;
		cin >> t;
		v.push_back(t);
		if(t >= y)cnt++;
		sum += t;
	}
	ll ex =  x - sum;
	if(ex < (n - k)){
		cout << "-1\n";
		return 0;
	}
	ll num = (n + 1)/2;
	if(cnt >= num){
		while(v.size() < n){
			v.push_back(1);
		}
	}
	else{
		ll tot = n - k;
		tot -= (num - cnt);
		if((num-cnt)*y + tot > sum||tot < 0){
			cout << "-1\n";
			return 0;
		}
		else{
			while(v.size() < n){
				if(cnt < num)
				v.push_back(y);
				else v.push_back(1);
				cnt++;
				sum -= y;
			}
		}

	}
	sum = 0;
	for(int i = 0; i < n; i++){
		sum += v[i];
	}
	if(sum > x){
		cout << "-1" << "\n";
	}
	for(int i = k; i < n; i++){
		cout << v[i] << " ";
	}
	cout << "\n";
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
	ll n,k,p,x,y;
	cin >> n >> k >> p >> x >> y;
	vector<ll> v,v2;
	ll sum = 0,cnt=0;
	for(int i = 0; i < k; i++){
		int t;
		cin >> t;
		v.push_back(t);
		if(t >= y)cnt++;
		sum += t;
	}
	ll ex =  x - sum;
	if(ex < (n - k)){
		cout << "-1\n";
		return 0;
	}
	ll num = (n + 1)/2;
	if(cnt >= num){
		while(v.size() < n){
			v.push_back(1);
		}
	}
	else{
		if((num-cnt)*y > ex){
			cout << "-1\n";
			return 0;
		}
		else{
			while(v.size() < n){
				if(cnt < num)
				v.push_back(y);
				else v.push_back(1);
				cnt++;
				sum -= y;
			}
		}
	}
	for(int i = k; i < n; i++){
		cout << v[i] << " ";
	}
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
	ll n,k,p,x,y;
	cin >> n >> k >> p >> x >> y;
	vector<ll> v,v2;
	ll sum = 0,cnt=0;
	for(int i = 0; i < k; i++){
		int t;
		cin >> t;
		v.push_back(t);
		if(t >= y)cnt++;
		sum += t;
	}
	ll ex =  x - sum;
	if(ex < (n - k)){
		cout << "-1\n";
		return 0;
	}
	ll num = (n + 1)/2;
	if(cnt >= num){
		while(v.size() < n){
			v.push_back(1);
		}
	}
	else{
		ll tot = n - k;
		tot -= (num - cnt);
		if((num-cnt)*y + tot > sum||tot < 0){
			cout << "-1\n";
			return 0;
		}
		else{
			while(v.size() < n){
				if(cnt < num)
				v.push_back(y);
				else v.push_back(1);
				cnt++;
				sum -= y;
			}
		}

	}
	sum = 0;
	for(int i = 0; i < n; i++){
		sum += v[i];
	}
	if(sum >= x){
		cout << "-1" << "\n";
	}
	for(int i = k; i < n; i++){
		cout << v[i] << " ";
	}
	cout << "\n";
}


#include <iostream>
#include <ctime>
#include <iomanip>
#include <vector>
#include <map>
#include <algorithm>
#include <string>
#include <cmath>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <chrono>
#include <stack>
#include <cassert>
#include <queue>
#include <deque>
#include <climits>
#include <cstring>
#include <random>
#include <bitset>

using namespace std;

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    #ifdef LOCAL
    assert(freopen("input.txt", "r", stdin));
    assert(freopen("output.txt", "w", stdout));
    #endif

    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> cur(k);
    for (auto &t : cur) {
        cin >> t;
    }
    int md = (n) / 2;
    int cnt = 0;
    for (int i = 0; i < k; i++) {
        if (cur[i] < y) {
            cnt++;
        }
    }
    if (cnt > md) {
        cout << "-1\n";
        return 0;
    } else {

        int add_small = min(n - k, md - cnt);
        int add_big = (n - k) - add_small;
//        if (add_big < 0) {
//            cout << "-1";
//            return 0;
//        }
        int sum = add_big * y + add_small * 1;
        for (int i = 0; i < k; i++) {
            sum += cur[i];
        }
        if (sum > x) {
            cout << "-1";
        } else {
            for (int i = 0; i < add_small; i++) {
                cout << 1 << ' ';
            }
            for (int i = 0; i < add_big; i++) {
                cout << y << '\n';
            }
        }
    }
}


#include <iostream>
#include <ctime>
#include <iomanip>
#include <vector>
#include <map>
#include <algorithm>
#include <string>
#include <cmath>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <chrono>
#include <stack>
#include <cassert>
#include <queue>
#include <deque>
#include <climits>
#include <cstring>
#include <random>
#include <bitset>

using namespace std;

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    #ifdef LOCAL
    assert(freopen("input.txt", "r", stdin));
    assert(freopen("output.txt", "w", stdout));
    #endif

    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> cur(k);
    for (auto &t : cur) {
        cin >> t;
    }
    int md = (n + 1) / 2;
    int cnt = 0;
    for (int i = 0; i < k; i++) {
        if (cur[i] <= y) {
            cnt++;
        }
    }

    if (cnt > md) {
        cout << "-1\n";
        return 0;
    } else {
        int add_small = md - cnt;
        int add_big = (n - k) - add_small;
        if (add_big < 0) {
            cout << "-1";
            return 0;
        }
        int sum = add_big * y + add_small * 1;
        for (int i = 0; i < k; i++) {
            sum += cur[i];
        }
        if (sum > x) {
            cout << "-1";
        } else {
            for (int i = 0; i < add_small; i++) {
                cout << 1 << ' ';
            }
            for (int i = 0; i < add_big; i++) {
                cout << y << '\n';
            }
        }
    }
}


#include <iostream>
#include <ctime>
#include <iomanip>
#include <vector>
#include <map>
#include <algorithm>
#include <string>
#include <cmath>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <chrono>
#include <stack>
#include <cassert>
#include <queue>
#include <deque>
#include <climits>
#include <cstring>
#include <random>
#include <bitset>

using namespace std;

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    #ifdef LOCAL
    assert(freopen("input.txt", "r", stdin));
    assert(freopen("output.txt", "w", stdout));
    #endif

    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> cur(k);
    for (auto &t : cur) {
        cin >> t;
    }
    int md = (n + 1) / 2;
    int cnt = 0;
    for (int i = 0; i < k; i++) {
        if (cur[i] <= y) {
            cnt++;
        }
    }

    if (cnt > md) {
        cout << "-1\n";
        return 0;
    } else {
        int add_small = md - cnt;
        int add_big = (n - k) - add_small;
        int sum = add_big * y + add_small * 1;
        for (int i = 0; i < k; i++) {
            sum += cur[i];
        }
        if (sum > x) {
            cout << "-1";
        } else {
            for (int i = 0; i < add_small; i++) {
                cout << 1 << ' ';
            }
            for (int i = 0; i < add_big; i++) {
                cout << y << '\n';
            }
        }
    }
}


#include <iostream>
#include <ctime>
#include <iomanip>
#include <vector>
#include <map>
#include <algorithm>
#include <string>
#include <cmath>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <chrono>
#include <stack>
#include <cassert>
#include <queue>
#include <deque>
#include <climits>
#include <cstring>
#include <random>
#include <bitset>

using namespace std;

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    #ifdef LOCAL
    assert(freopen("input.txt", "r", stdin));
    assert(freopen("output.txt", "w", stdout));
    #endif

    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    vector<int> cur(k);
    for (auto &t : cur) {
        cin >> t;
    }
    int md = (n) / 2;
    int cnt = 0;
    for (int i = 0; i < k; i++) {
        if (cur[i] < y) {
            cnt++;
        }
    }
    if (cnt > md) {
        cout << "-1\n";
        return 0;
    } else {
        int add_small = md - cnt;
        int add_big = (n - k) - add_small;
        if (add_big < 0) {
            cout << "-1";
            return 0;
        }
        int sum = add_big * y + add_small * 1;
        for (int i = 0; i < k; i++) {
            sum += cur[i];
        }
        if (sum > x) {
            cout << "-1";
        } else {
            for (int i = 0; i < add_small; i++) {
                cout << 1 << ' ';
            }
            for (int i = 0; i < add_big; i++) {
                cout << y << '\n';
            }
        }
    }
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<math.h>
#include<queue>
#include<vector>
#include <map>
using namespace std;

int a[1005];

int main()
{
    int n,k,p,x,y;
    int sum=0,median,cnt=0;
    scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
    for(int i=1;i<=k;i++)
    {
        scanf("%d",&a[i]);
        sum+=a[i];
        if(a[i]>=y)
            cnt++;
    }
    if(sum+(n-k)>x)
        printf("-1\n");
    else if(k>=(n+1)/2)
    {
        sort(a+1,a+1+k);
        median=a[(n+1)/2];
        if(median<y)
            printf("-1\n");
        else
        {
            if(cnt-1>=n-k)
            {
                if(sum+n-k>x)
                    printf("-1\n");
                else
                {
                    for(int i=k+1;i<=n;i++)
                        printf("1 ");
                    printf("\n");
                }
            }
            else
            {
                if(sum+cnt-1+y*(n-k-cnt+1)>x)
                    printf("-1\n");
                else
                {
                    for(int i=k+1;i<=k+cnt-1;i++)
                        printf("1 ");
                    for(int i=k+cnt;i<=n;i++)
                        printf("%d ",y);
                    printf("\n");
                }
            }
        }
    }
    else
    {
        int num_1=(n+1)/2-1-(k-cnt);
        int num_y=n-k-num_1;
        if(sum+num_1+num_y*y>x)
            printf("-1\n");
        else
        {
            for(int i=0;i<num_1;i++)
                printf("1 ");
            for(int i=0;i<num_y;i++)
                printf("%d ",y);
            printf("\n");
        }
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<math.h>
#include<queue>
#include<vector>
#include <map>
using namespace std;

int a[1005];

int main()
{
    int n,k,p,x,y;
    int sum=0,median,cnt=0;
    scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
    for(int i=1;i<=k;i++)
    {
        scanf("%d",&a[i]);
        sum+=a[i];
        if(a[i]>=y)
            cnt++;
    }
    if(sum+(n-k)>x)
        printf("-1\n");
    else if(k>=(n+1)/2)
    {
        sort(a+1,a+1+k);
        median=a[(n+1)/2];
        if(median<y)
            printf("-1\n");
        else
        {
            int num_1=(n+1)/2-1-(k-cnt);
            if(num_1>n-k)
                num_1=n-k;
            int num_y=n-k-num_1;
            if(sum+num_1+num_y*y>x)
                printf("-1\n");
            else
            {
                for(int i=0;i<num_1;i++)
                    printf("1 ");
                for(int i=0;i<num_y;i++)
                    printf("%d ",y);
                printf("\n");
            }
        }
    }
    else
    {
        int num_1=(n+1)/2-1-(k-cnt);
        int num_y=n-k-num_1;
        if(sum+num_1+num_y*y>x)
            printf("-1\n");
        else
        {
            for(int i=0;i<num_1;i++)
                printf("1 ");
            for(int i=0;i<num_y;i++)
                printf("%d ",y);
            printf("\n");
        }
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<math.h>
#include<queue>
#include<vector>
#include <map>
using namespace std;

int a[1005];

int main()
{
    int n,k,p,x,y;
    int sum=0,median,cnt=0;
    scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
    for(int i=1;i<=k;i++)
    {
        scanf("%d",&a[i]);
        sum+=a[i];
        if(a[i]>=y)
            cnt++;
    }
    if(sum+(n-k)>x)
        printf("-1\n");
    else if(k>=(n+1)/2)
    {
        sort(a+1,a+1+k);
        median=a[(n+1)/2];
        if(median<y)
            printf("-1\n");
        else
        {
            if(cnt-1>=n-k)
            {
                if(sum+n-k>x)
                    printf("-1\n");
                else
                {
                    for(int i=k+1;i<=n;i++)
                        printf("1 ");
                    printf("\n");
                }
            }
            else
            {
                if(sum+cnt-1+y*(n-k-cnt+1)>x)
                    printf("-1\n");
                else
                {
                    for(int i=k+1;i<=k+cnt-1;i++)
                        printf("1 ");
                    for(int i=k+cnt;i<=n;i++)
                        printf("%d ",y);
                    printf("\n");
                }
            }
        }
    }
    else
    {
        int num_1=(n+1)/2-1-(k-cnt);
        int num_y=n-k-num_1;
        if(sum+num_1+num_y*y>sum)
            printf("-1\n");
        else
        {
            for(int i=0;i<num_1;i++)
                printf("1 ");
            for(int i=0;i<num_y;i++)
                printf("%d ",y);
            printf("\n");
        }
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<math.h>
#include<queue>
#include<vector>
#include <map>
using namespace std;

int a[1005];

int main()
{
    int n,k,p,x,y;
    int sum=0,median,cnt=0;
    scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
    for(int i=1;i<=k;i++)
    {
        scanf("%d",&a[i]);
        sum+=a[i];
        if(a[i]>=y)
            cnt++;
    }
    if(sum+(n-k)>x)
        printf("-1\n");
    else if(k>=(n+1)/2)
    {
        sort(a+1,a+1+k);
        median=a[(n+1)/2];
        if(median<y)
            printf("-1\n");
        else
        {
            int num_1=(n+1)/2-1-(k-cnt);
            int num_y=n-k-num_1;
            if(sum+num_1+num_y*y>x)
            printf("-1\n");
            else
            {
                for(int i=0;i<num_1;i++)
                    printf("1 ");
                for(int i=0;i<num_y;i++)
                    printf("%d ",y);
                printf("\n");
            }
        }
    }
    else
    {
        int num_1=(n+1)/2-1-(k-cnt);
        int num_y=n-k-num_1;
        if(sum+num_1+num_y*y>x)
            printf("-1\n");
        else
        {
            for(int i=0;i<num_1;i++)
                printf("1 ");
            for(int i=0;i<num_y;i++)
                printf("%d ",y);
            printf("\n");
        }
    }
    return 0;
}


//um passing time with the chili sauce
#include<bits/stdc++.h>
using namespace std;
#define  fast()         ios :: sync_with_stdio(false); cin.tie(0);
#define  go            return 0
#define  ll             long long int
#define  ull            unsigned long long int
#define  ld             long double
#define  vi             vector<int>
#define vl            vector<long long>
#define vc             vector<char>
#define vp             vector< pair<ll,ll> >
int main(){
ll i,j,n,k,p,s,x,y,m,t,b,c=1,mini,maxi,sum=0,d=0,ans=0,a,e,f,o=0;
vi v;
vl v1;
fast();
string s1,s2;
cin>>n>>k>>p>>x>>y;
for(i=1;i<=k;i++){
    cin>>a;
    sum=sum+a;
    v.push_back(a);
}
m=x-sum;
s=m/(n-k);
for(i=1;i<n-k;i++){
   v.push_back(s);
}
    if(m%(n-k)!=0) t=m-s*(n-k);
    else t=s;
    v.push_back(t);
sort(v.begin(),v.end());
for(i=0;i<v.size();i++){
    if(v[i]==0) o++;
}
for(i=0;i<v.size();i++) d+=v[i];
if(o>=1) c=0;
else{
    c=1;
for(i=0;i<y;i++){
   e=v[y-1];
   f=p-e;
}
}
if(c==0) cout<<-1<<"\n";
else cout<<s<<" "<<1<<"\n";
go;
}


//um passing time with the chili sauce
#include<bits/stdc++.h>
using namespace std;
#define  fast()         ios :: sync_with_stdio(false); cin.tie(0);
#define  go            return 0
#define  ll             long long int
#define  ull            unsigned long long int
#define  ld             long double
#define  vi             vector<int>
#define vl            vector<long long>
#define vc             vector<char>
#define vp             vector< pair<ll,ll> >
int main(){
ll i,j,n,k,p,s,x,y,m,t,b,c=1,mini,maxi,sum=0,d=0,ans=0,a,e,f,o=0,q=0;
vi v;
vi::iterator it;
vl v1;
fast();
string s1,s2;
cin >> n >> k >> p >> x >> y;
    for(i = 0; i < k; ++i){
        cin>>a;
        if(a<y) q++;
        sum+=a;
    }
    if((n-1)/2 < q){
        cout<<-1<<endl;
        go;
    }
    q = k-q;
    while(q < (n+1)/2){
            k++;
            q++;
            sum += y;
            v.push_back(y);
    }

    if(sum+n-k>x){
       cout << -1 <<endl;
       go;
    }
    for(it=v.begin();it!=v.end();it++)cout<<*it<<" ";
    for(i=0;i<n-k;++i) cout<<1<<" ";
    cout << endl;
go;
}


//um passing time with the chili sauce
#include<bits/stdc++.h>
using namespace std;
#define  fast()         ios :: sync_with_stdio(false); cin.tie(0);
#define  go            return 0
#define  ll             long long int
#define  ull            unsigned long long int
#define  ld             long double
#define  vi             vector<int>
#define vl            vector<long long>
#define vc             vector<char>
#define vp             vector< pair<ll,ll> >
int main(){
ll i,j,n,k,p,s,x,y,m,t,b,c=1,mini,maxi,sum=0,d=0,ans=0,a,e,f,o=0;
vi v;
vl v1;
fast();
string s1,s2;
cin>>n>>k>>p>>x>>y;
for(i=1;i<=k;i++){
    cin>>a;
    sum=sum+a;
    v.push_back(a);
}
m=x-sum;
s=m/(n-k);
for(i=1;i<n-k;i++){
   v.push_back(s);
}
    if(m%(n-k)!=0) t=m-s*(n-k);
    else t=s;
    v.push_back(t);
sort(v.begin(),v.end());
for(i=0;i<v.size();i++){
    if(v[i]==0) o++;
}
for(i=0;i<v.size();i++) d+=v[i];
if(o>=1) c=0;
else{
    c=1;
for(i=0;i<y;i++){
   e=v[y-1];
   f=p-e;
}
}
if(c==0) cout<<-1<<"\n";
else cout<<s<<" "<<t<<"\n";
go;
}


//um passing time with the chili sauce
#include<bits/stdc++.h>
using namespace std;
#define  fast()         ios :: sync_with_stdio(false); cin.tie(0);
#define  go            return 0
#define  ll             long long int
#define  ull            unsigned long long int
#define  ld             long double
#define  vi             vector<int>
#define vl            vector<long long>
#define vc             vector<char>
#define vp             vector< pair<ll,ll> >
int main(){
ll i,j,n,k,p,s,x,y,m,t,b,c=1,mini,maxi,sum=0,d=0,ans=0,a,e,f,o=0;
vi v;
vl v1;
fast();
string s1,s2;
cin>>n>>k>>p>>x>>y;
for(i=1;i<=k;i++){
    cin>>a;
    sum=sum+a;
    v.push_back(a);
}
m=x-1-sum;
s=m/(n-k);
for(i=1;i<n-k;i++){
   v.push_back(s);
}
    t=m-s*(n-k);
    v.push_back(t);
sort(v.begin(),v.end());
for(i=0;i<v.size();i++){
    if(v[i]==0) o++;
}
for(i=0;i<v.size();i++) d+=v[i];
if(o>=1) c=0;
else{
    c=1;
for(i=0;i<y;i++){
   e=v[y-1];
   f=p-e;
}
}
if(c==0) cout<<-1<<"\n";
else cout<<e<<" "<<f<<"\n";
go;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n,p,x,y,k,i,j,cnt_low_mid=0,a[10001];
	cin>>n>>k>>p>>x>>y;
	int sum=0;
	for(i=0;i<k;i++){
		cin>>a[i];
		sum+=a[i];
		cnt_low_mid+=(a[i]<y);
	}
	bool ok=1;
	if(cnt_low_mid>(n+1)/2-1)ok=0;
	vector<int> vec;
	int lowmid=(n+1)/2-1-cnt_low_mid;
	int highmid=n-((n+1)/2-1)-(k-cnt_low_mid);

	//cout<<lowmid<<' '<<highmid<<endl;

	int temp_sum;
	temp_sum=highmid*y+lowmid*1;
	for(i=0;i<n;i++){
		if(lowmid)vec.push_back(1),lowmid--;
		if(highmid) vec.push_back(y),highmid--;
	}
	if(temp_sum+sum>x) ok=0;
	if(!ok) cout<<-1;
	else{
		int len=vec.size();
		for(i=0;i<len;i++){
			cout<<vec[i]<<' ';
		}

	}

}


#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n,p,x,y,k,i,j,cnt_low_mid=0,a[10001],cnt_high_mid=0,cnt=0;
	cin>>n>>k>>p>>x>>y;
	int sum=0;
	for(i=0;i<k;i++){
		cin>>a[i];
		sum+=a[i];
		cnt_low_mid+=(a[i]<y);
		cnt_high_mid+=(a[i]>y);
		cnt+=(a[i]==y);
	}
	bool ok=1;
	if(cnt_low_mid>(n+1)/2-1||cnt_high_mid>(n+1)/2)ok=0;
	vector<int> vec;
	int lowmid=min(n-k,(n+1)/2-1-cnt_low_mid);
	int highmid=n-lowmid-cnt-cnt_high_mid-cnt_low_mid;

	//cout<<lowmid<<' '<<highmid<<endl;

	int temp_sum;
	temp_sum=highmid*y+lowmid*1;
	for(i=0;i<n;i++){
		if(lowmid)vec.push_back(1),lowmid--;
		if(highmid) vec.push_back(y),highmid--;
	}
	if(temp_sum+sum>x) ok=0;
	if(!ok) cout<<-1;
	else{
		int len=vec.size();
		for(i=0;i<len;i++){
			cout<<vec[i]<<' ';
		}

	}

}


#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n,p,x,y,k,i,j,cnt_low_mid=0,a[10001],cnt_high_mid=0,cnt=0;
	cin>>n>>k>>p>>x>>y;
	int sum=0;
	for(i=0;i<k;i++){
		cin>>a[i];
		sum+=a[i];
		cnt_low_mid+=(a[i]<y);
		cnt_high_mid+=(a[i]>y);
		cnt+=(a[i]==y);
	}
	bool ok=1;
	if(cnt_low_mid>(n+1)/2-1)ok=0;
	vector<int> vec;
	int lowmid=min(n-k,(n+1)/2-1-cnt_low_mid);
	int highmid=n-lowmid-cnt-cnt_high_mid-cnt_low_mid;

	//cout<<lowmid<<' '<<highmid<<endl;

	int temp_sum;
	temp_sum=highmid*y+lowmid*1;
	for(i=0;i<n;i++){
		if(lowmid)vec.push_back(1),lowmid--;
		if(highmid) vec.push_back(y),highmid--;
	}
	if(temp_sum+sum>x) ok=0;
	if(!ok) cout<<-1;
	else{
		int len=vec.size();
		for(i=0;i<len;i++){
			cout<<vec[i]<<' ';
		}

	}

}


#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <stack>
#include <cmath>
#include <time.h>
#include <unordered_set>
#include <unordered_map>
#define ll long long
#define LINF 0x3f3f3f3f3f3f3f3f
#define INF 0x3f3f3f3f
#define PI 3.14159265
#define RAND (rand()*rand())
#define MAX(x, y) ((x) > (y) ? (x):(y))
#define MIN(x, y) ((x) > (y) ? (y):(x))
#define ABS(x) ((x) > 0 ? (x) : -(x))
#define CEIL(x, y) (((x) + (y) - 1)/(y))
using namespace std;
const int MAXN = 1e5 + 5;
const ll MOD = 1e9 + 7;
int N, M, K, Q, T;
vector<int> vec;

int main()
{
	int i, j, p, x, y, z;
	scanf("%d%d%d%d%d", &N, &K, &p, &x, &y);
	int kb = 0;
	int S = 0;
	for (i = 1; i <= K; ++i) {
		scanf("%d", &z);
		if (z >= y) kb++;
		S += z;
	}
	int need = (N + 1) / 2 - kb;
	if (need <= 0) need = 0;
	for (i = 1; i <= need; ++i) vec.push_back(y);
	for (i = 1; i <= N - K - need; ++i) vec.push_back(1);
	for (i = 0; i < vec.size(); ++i) S += vec[i];
	if (S > x) {
		printf("-1");
	}
	else {
		for (i = 0; i < vec.size(); ++i) printf("%d ", vec[i]);
	}
	return 0;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <stack>
#include <cmath>
#include <time.h>
#include <unordered_set>
#include <unordered_map>
#define ll long long
#define LINF 0x3f3f3f3f3f3f3f3f
#define INF 0x3f3f3f3f
#define PI 3.14159265
#define RAND (rand()*rand())
#define MAX(x, y) ((x) > (y) ? (x):(y))
#define MIN(x, y) ((x) > (y) ? (y):(x))
#define ABS(x) ((x) > 0 ? (x) : -(x))
#define CEIL(x, y) (((x) + (y) - 1)/(y))
using namespace std;
const int MAXN = 1e5 + 5;
const ll MOD = 1e9 + 7;
int N, M, K, Q, T;
vector<int> vec;

int main()
{
	int i, j, p, x, y, z;
	scanf("%d%d%d%d%d", &N, &K, &p, &x, &y);
	int S = 0;
	int kb = 0;
	for (i = 1; i <= K; ++i) {
		scanf("%d", &z);
		if (z >= y) kb++;
		S += z;
	}
	if ((x - S) / (N - K) <= 0) {
		printf("-1");
		return 0;
	}
	int need = (N + 1) / 2 - kb;
	if (need <= 0) need = 0;
	int left = x - S - need * y;
	if (left < 0) {
		printf("-1");
		return 0;
	}
	for (i = 1; i <= need; ++i) vec.push_back(y);
	int q = left / (N - K - need);
	int r = left % (N - K - need);
	if (q <= 0) {
		printf("-1");
		return 0;
	}
	for (i = 1; i <= N - K - need; ++i) {
		if (r) {
			vec.push_back(q + 1);
			--r;
		}
		else vec.push_back(q);
	}
	for (i = 0; i < vec.size(); ++i) printf("%d ", vec[i]);
	return 0;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <stack>
#include <cmath>
#include <time.h>
#include <unordered_set>
#include <unordered_map>
#define ll long long
#define LINF 0x3f3f3f3f3f3f3f3f
#define INF 0x3f3f3f3f
#define PI 3.14159265
#define RAND (rand()*rand())
#define MAX(x, y) ((x) > (y) ? (x):(y))
#define MIN(x, y) ((x) > (y) ? (y):(x))
#define ABS(x) ((x) > 0 ? (x) : -(x))
#define CEIL(x, y) (((x) + (y) - 1)/(y))
using namespace std;
const int MAXN = 1e5 + 5;
const ll MOD = 1e9 + 7;
int N, M, K, Q, T;
vector<int> vec;

int main()
{
	int i, j, p, x, y, z;
	scanf("%d%d%d%d%d", &N, &K, &p, &x, &y);
	int S = 0;
	int ks = 0;
	for (i = 1; i <= K; ++i) {
		scanf("%d", &z);
		if (z <= y) ks++;
		S += z;
	}
	if ((x - S) / (N - K) <= 0) {
		printf("-1");
		return 0;
	}
	int need = (N + 1) / 2 - ks;
	if (need <= 0) need = 0;
	int left = x - S - need * y;
	if (left < 0) {
		printf("-1");
		return 0;
	}
	for (i = 1; i <= need; ++i) vec.push_back(y);
	int q = left / (N - K - need);
	int r = left % (N - K - need);
	if (q <= 0) {
		printf("-1");
		return 0;
	}
	for (i = 1; i <= N - K - need; ++i) {
		if (r) {
			vec.push_back(q + 1);
			--r;
		}
		else vec.push_back(q);
	}
	for (i = 0; i < vec.size(); ++i) printf("%d ", vec[i]);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
    ll i,j,k,l,n,m,ab;
    cin>>n>>m;
    vector<ll>v;
    map<ll,ll>mm;
    vector<ll>v1;
    for(i=0;i<n;i++){
        cin>>ab;
        if(mm[ab]==0)
            v.push_back(ab);
        mm[ab]++;
    }
    for(i=0;i<v.size();i++){
        if(mm[v[i]]%2==0){
            v1.push_back(mm[v[i]]);
        }
    }
    for(i=0;i<v.size();i++){
        if(mm[v[i]]%2==1){
            v1.push_back(mm[v[i]]);
        }
    }

    ll siz=(n+1)/2;
    ll ans=0;
    for(i=0;i<v1.size();i++){
        if(siz==0)break;
        while(v1[i]>=2){
            v1[i]-=2;
            siz--;
            ans+=2;
            if(siz==0)break;
        }
    }
    for(i=0;i<v1.size();i++){
        if(siz==0)break;
        while(v1[i]>=1){
            v1[i]-=1;
            siz--;
            ans+=1;
            if(siz==0)break;
        }
    }
    cout<<ans<<endl;
}


#include<bits/stdc++.h>
using namespace std;

long long a[100005];

int main()
{
    int n,m,i,j,k,c=0,cnt=0,x,y,z,ans=0;
    cin>>n>>k;
    for(i=0; i<n; i++)
    {
        cin>>m;
        ++a[m];
    }
    long long b[100005];
    for(i=0; i<k; i++)
    {
        b[i] = a[i+1];
    }
    sort(b,b+k);
    ans = (n+1)/2;
    for(i=0; i<k; i++)
    {
        if(cnt==ans)
                break;
        while(b[i]>=2)
        {
            b[i]-=2;
            c+=2;
            ++cnt;
            if(cnt==ans)
                break;
        }
        if(cnt==ans)
                break;
    }
    for(i=0; i<k; i++)
    {
        if(cnt==ans)
                break;
        while(b[i]>=1)
        {
            b[i]-=1;
            c+=1;
            ++cnt;
            if(cnt==ans)
                break;
        }
        if(cnt==ans)
                break;
    }

    cout<<c<<endl;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
    ll i,j,k,l,n,m,ab;
    cin>>n>>m;
    vector<ll>v;
    map<ll,ll>mm;
    vector<ll>v1;
    for(i=0;i<n;i++){
        cin>>ab;
        if(mm[ab]==0)
            v.push_back(ab);
        mm[ab]++;
    }
    for(i=1;i<=m;i++){
            v1.push_back(mm[i]);
           //cout<<mm[v[i]]<<"llk "<<endl;
    }

    sort(v1.rbegin(),v1.rend());
    ll siz=(n+1)/2;
    ll ans=0;
    for(i=0;i<m;i++){
          //  cout<<v1[i]<< " ->";
        while(v1[i]>0){
            v1[i]-=2;
          //  cout<<v1[i]<<" ";
            siz--;
            if(v1[i]==-1)
                ans+=1;
            else
                ans+=2;
                  if(siz==0)break;
        }
        if(siz==0)break;
   // cout<<endl;
    }
    cout<<ans<<endl;
}
    //for()


#include<bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
    ll i,j,k,l,n,m,ab;
    cin>>n>>m;
    vector<ll>v;
    map<ll,ll>mm;
    vector<ll>v1;
    for(i=0;i<n;i++){
        cin>>ab;
        if(mm[ab]==0)
            v.push_back(ab);
        mm[ab]++;
    }
    for(i=1;i<=m;i++){
            v1.push_back(mm[i]);
           //cout<<mm[v[i]]<<"llk "<<endl;
    }

    sort(v1.rbegin(),v1.rend());
    ll siz=(n+1)/2;
    ll ans=0;
    for(i=0;i<m;i++){
          //  cout<<v1[i]<< " ->";
            if(siz==0)break;
        while(v1[i]>0){
            v1[i]-=2;
          //  cout<<v1[i]<<" ";
            siz--;
            if(v1[i]==-1)
                ans+=1;
            else
                ans+=2;
            if(siz==0)break;
        }
   // cout<<endl;
    }
    cout<<ans<<endl;
}
    //for()


#include<bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
    ll i,j,k,l,n,m,ab;
    cin>>n>>m;
    vector<ll>v;
    map<ll,ll>mm;
    vector<ll>v1;
    for(i=0;i<n;i++){
        cin>>ab;
        if(mm[ab]==0)
            v.push_back(ab);
        mm[ab]++;
    }
    for(i=0;i<v.size();i++){
        if(mm[v[i]]%2==0){
            v1.push_back(mm[v[i]]);
        }
    }
    for(i=0;i<v.size();i++){
        if(mm[v[i]]%2==1){
            v1.push_back(mm[v[i]]);
        }
    }
//    if(n==1000){
//    cout<<v1.size()<<endl;
//    for(i=0;i<v1.size();i++){
//       cout<<v1[i]<<endl;
//    }
    //}
    ll siz=(n+1)/2;
    //cout<<siz<<endl;
    ll ans=0;
    for(i=0;i<v1.size();i++){
        if(siz==0)break;
        while(v1[i]>0){
            v1[i]-=2;
            //cout<<v1[i]<<" "<<endl;
            siz--;
            if(v1[i]==-1)
                ans+=1;
            else
                ans+=2;
            if(siz==0)break;
        }
    }
    cout<<ans<<endl;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
    ll i,j,k,l,n,m,ab;
    cin>>n>>m;
    vector<ll>v;
    map<ll,ll>mm;
    vector<ll>v1;
    for(i=0;i<n;i++){
        cin>>ab;
        if(mm[ab]==0)
            v.push_back(ab);
        mm[ab]++;
    }
    for(i=0;i<v.size();i++){
        if(mm[v[i]]%2==0){
            v1.push_back(mm[v[i]]);
        }
    }
    for(i=0;i<v.size();i++){
        if(mm[v[i]]%2==1){
            v1.push_back(mm[v[i]]);
        }
    }
    if(n==1000){
    cout<<v1.size()<<endl;
    for(i=0;i<v1.size();i++){
       cout<<v1[i]<<endl;
    }
    }
    ll siz=n/2+(n&1);
    //cout<<siz<<endl;
    ll ans=0;
    for(i=0;i<v1.size();i++){
            //cout<<endl;
        while(v1[i]>0){
            if(siz==0)break;
            v1[i]-=2;
            //cout<<v1[i]<<" "<<endl;
            siz--;
            if(v1[i]==-1)
                ans+=1;
            else
                ans+=2;

        }
        if(siz==0)break;

    }
    cout<<ans<<endl;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
    ll i,j,k,l,n,m,ab;
    cin>>n>>m;
    vector<ll>v;
    map<ll,ll>mm;
    vector<ll>v1;
    for(i=0; i<n; i++)
    {
        cin>>ab;
        if(mm[ab]==0)
            v.push_back(ab);
        mm[ab]++;
    }
    for(i=1; i<=m; i++)
    {
        if(mm[i]%2==0)
            v1.push_back(mm[i]);
        //cout<<mm[v[i]]<<"llk "<<endl;
    }
    for(i=1; i<=m; i++)
    {
        if(mm[i]%2==1)
            v1.push_back(mm[i]);
    }
    if(n==1000)
    {
        cout<<v1.size()<<endl<<endl;;
        for(i=0; i<m; i++)
        {
            cout<<v1[i]<<endl;
        }
    }

    //sort(v1.begin(),v1.end());
    ll siz=(n+1)/2;
    ll ans=0;
    for(i=0; i<m; i++)
    {
        //  cout<<v1[i]<< " ->";
        if(siz==0)
            break;
        while(v1[i]>0)
        {
            v1[i]-=2;
            //  cout<<v1[i]<<" ";
            siz--;
            if(v1[i]==-1)
                ans+=1;
            else
                ans+=2;
            if(siz==0)
                break;
        }
        // cout<<endl;
    }
    cout<<ans<<endl;
}
//for()


#include<bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
    ll i,j,k,l,n,m,ab;
    cin>>n>>m;
    vector<ll>v;
    map<ll,ll>mm;
    vector<ll>v1;
    for(i=0;i<n;i++){
        cin>>ab;
        if(mm[ab]==0)
            v.push_back(ab);
        mm[ab]++;
    }
    for(i=0;i<v.size();i++){
        //if(mm[v[i]]%2==0){
            v1.push_back(mm[v[i]]);
           // cout<<mm[v[i]]<<"llk "<<endl;
        //}
    }
    sort(v1.rbegin(),v1.rend());
    ll siz=n/2+(n&1);
    ll ans=0;
    for(i=0;i<v1.size();i++){
          //  cout<<v1[i]<< " ->";
        while(v1[i]>0){
            v1[i]-=2;
          //  cout<<v1[i]<<" ";
            siz--;
            if(v1[i]==-1)
                ans+=1;
            else
                ans+=2;
            if(siz==0)break;
        }
        if(siz==0)break;
   // cout<<endl;
    }
    cout<<ans<<endl;
}
    //for()


#include<bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
    ll i,j,k,l,n,m,ab;
    cin>>n>>m;
    vector<ll>v;
    map<ll,ll>mm;
    vector<ll>v1;
    for(i=0;i<n;i++){
        cin>>ab;
        if(mm[ab]==0)
            v.push_back(ab);
        mm[ab]++;
    }
    for(i=0;i<v.size();i++){
        if(mm[v[i]]%2==0){
            v1.push_back(mm[v[i]]);
        }
    }
    for(i=0;i<v.size();i++){
        if(mm[v[i]]%2==1){
            v1.push_back(mm[v[i]]);
        }
    }
//    cout<<v1.size()<<endl;
//    for(i=0;i<v1.size();i++){
//        cout<<v1[i]<<endl;
//    }
    ll siz=n/2+(n&1);
    //cout<<siz<<endl;
    ll ans=0;
    for(i=0;i<v1.size();i++){
            //cout<<endl;
        while(v1[i]>0){
            if(siz==0)break;
            v1[i]-=2;
            //cout<<v1[i]<<" "<<endl;
            siz--;
            if(v1[i]==-1)
                ans+=1;
            else
                ans+=2;

        }
        if(siz==0)break;

    }
    cout<<ans<<endl;
}
    //for()


#include <iostream>
#include <vector>
#include <algorithm>

int chet(int n, int k){

	std::vector<int> v(n);

	for(int i=0; i<n; i++){
		std::cin>>v[i];
	}
	int sum=0;
	for(int x : v){
		if(n>sum+x){
			sum+=x;
		}

	}

	return sum;

}

int main(){

	int n,k;
	std::cin >> n >> k;

	std::cout << chet(n,k);

}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

int main(){

	int n,k;
	std::cin >> n >> k;
	int tmp=ceil(n/2);

	std::vector<int> v(n);

	for(int i=0;i<n;i++){
		std::cin >> v[i];
	}

	if(n%2==0){
		std::cout << tmp*2-1;
	}else{
		std::cout << tmp*2;
	}
	//std::cout << chet(n,k);

}


#include <iostream>
#include <vector>
#include <algorithm>

int chet(int n, int k){

	std::vector<int> v(n);

	for(int i=0; i<n; i++){
		std::cin>>v[i];
	}

	std::sort(v.begin(),v.end(),std::greater<int>());

	int sum=0;
	for(int x : v){
		if(n>sum+x){
			sum+=x;
		}

	}

	return sum;

}

int main(){

	int n,k;
	std::cin >> n >> k;

	std::cout << chet(n,k);

}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

int main(){

    	int n,k;
	std::cin >> n >> k;
	std::vector<int> v(k+1, 0);

	for(int i = 0; i<n;i++){
    		int x;
		std::cin >> x;
    		v[x]++;
    	}

	int ans = 0, odd = 0;

	for(int i = 1; i<=k; i++){
    		if(v[i]%2==0 && v[i]){
			ans += v[i];
		}
    		if(v[i]%2){
    			ans += v[i]-1;
    			odd++;
    		}
    	}

	ans += odd/2;

	if(odd%2){
		ans++;
	}
	std::cout << ans;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

int main(){

	int n,k;
	std::cin >> n >> k;
	int tmp=ceil(n/2);
	std::vector<int> v(n);

	if(n%2!=0){
		tmp=tmp*2+1;
	}else{
		tmp=tmp*2;
	}

	for(int i=0;i<n;i++){
		std::cin >> v[i];
	}
	int sum=0;

	std::sort(v.begin(),v.end(),std::greater<int>());

	for(int x: v){
		if(tmp>sum+x)
			sum+=x;
	}

	std::cout << sum;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>

int chet(int n, int k){
	std::vector<int> v(n);
	std::vector<int> v_one(3);
	bool f;
	int scer=0;
	int num=0;

	for(int i=0; i<n; i++){
		std::cin >> v[i];
	}

	std::sort(v.begin(),v.end());

	for(int i=1; i<n; i++){
			f=true;
			if( v[i-1]!=v[i]){
				f=false;
				scer=0;
				num++;
			}
			if(f && scer<=k ){
				scer++;
				v_one[num]=scer+1;
			}else{
				v_one[num]=1;
			}

	}

//std::sort(v_one.begin(),v_one.end(),std::greater<int>());

	int sum=0;
	for(int x : v_one){

		   sum+=x;
	}

	std::cout << sum-1;

	return 0;
}

int main(){

	int n,k;
	std::cin >> n >> k;

	if(n%2==0){
		chet(n,k);
	}else{
		chet(n,k);
	}

}


#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("Os")
using namespace std;
#define ll long long
#define ENSHREWD ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int main()
{
    ENSHREWD
    string str,s;
    ll n,x,y,b,k=1,a,i,j,t,sum=0,m,c,r=0;
    cin>>n>>k;
    int arr[k]={0};
    for(i=1;i<=n;i++)
        {
            cin>>a;
            ++arr[a];
        }
    for(i=1;i<=k;i++)
    {
        sum+=arr[i]/2*2;
        r+=arr[i]&1;
    }
    ++r;
    r/=2;
    cout<<sum+r;
    return 0;
}


#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("Os")
using namespace std;
#define ll long long
#define ENSHREWD ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int main()
{
    ENSHREWD
    string str,s;
    ll n,x,y,b,k=1,a,i,j,t,sum=0,m,c,r=0;
    cin>>n>>k;
    int arr[k]={0};
    for(i=1;i<=n;i++)
        {
            cin>>a;
            ++arr[a];
        }
    for(i=1;i<=k;i++)
    {
        sum+=arr[i]/2*2;
        r+=arr[i]&1;
    }
    cout<<sum+(r+1)/2;
    return 0;
}


#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("Os")
using namespace std;
#define ll long long
#define ENSHREWD ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int main()
{
    ENSHREWD
    string str,s;
    ll n,x,y,b,k=1,a,i,j,t,sum=0,m,c,r=0;
    cin>>n>>k;
    int arr[k]={0};
    for(i=1;i<=n;i++)
        {
            cin>>a;
            ++arr[a];
        }
    for(i=1;i<=k;i++)
    {
        sum+=arr[i]/2*2;
        r+=arr[i]&1;
    }
    ++r;
    r/=2;
    sum+=r;
    cout<<sum;
    return 0;
}


#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("Os")
using namespace std;
#define ll long long
#define ENSHREWD ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int main()
{
    ENSHREWD
    string str,s;
    ll n,x,y,b,k=0,a,i,j,t,sum=0,m;
    cin>>n>>k;
    ll arr[n],arr1[k]={0};
    for(i=0;i<n;i++)
    {
        cin>>arr[i];
        m=arr[i]-1;
        arr1[m]++;
    }
    t=n+1;
    t/=2;
    sort(arr1,arr1+k,greater<int>());
    for(i=0;i<k;i++)
    {
        if(2*t>arr1[i])
        {sum+=arr1[i];
         t-=(arr1[i]+1)/2;
        }
        else
        break;
    }
    if(t==0)
        cout<<sum;
    else
        cout<<sum+t*2;
    return 0;
}


#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("Os")
using namespace std;
#define ll long long
#define ENSHREWD ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int main()
{
    ENSHREWD
    string str,s;
    ll n,x,y,b,k=1,a,i,j,t,sum=0,m,c,r=0;
    cin>>n>>k;
    int arr[2000]={0};
    for(i=1;i<=n;i++)
        {
            cin>>a;
            ++arr[a];
        }
    for(i=1;i<=k;i++)
    {
        sum+=arr[i]/2*2;
        r+=arr[i]&1;
    }
    ++r;
    r/=2;
    sum+=r;
    cout<<sum;
    return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
const int maxn = 1e3+10;
int a[maxn];
int main()
{
    int n , k , ans = 0 , x;
    scanf("%d%d",&n , &k);
    for(int i = 1; i <= n; i++) a[i] = 0;
    for(int i = 0; i < n; i++)
    {
        scanf("%d",&x);
        ++a[x];
    }
    for(int i = 1; i <= n; i++)
    {
        if(a[i] & 1) ++ans;
    }
    ans = ans >> 1;
    printf("%d\n",n - ans);
    return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
const int maxn = 1e3+10;
int a[maxn];
int read()
{
    char ch = getchar(); int x = 0, f = 1;
    while (ch<'0' || ch>'9') { if (ch == '-')f = -1; ch = getchar(); }
    while (ch >= '0' && ch <= '9') { x = x * 10 + ch - '0'; ch = getchar(); }
    return x * f;
}
int main()
{
    int n , k , ans = 0 , x;
    n = read(); k = read();
    for(int i = 1; i <= n; i++)
    {
        x = read();
        ++a[x];
    }
    for(int i = 1; i <= k; i++)
    {
        if(a[i] & 1) ++ans;
    }
    ans = ans >> 1;
    printf("%d\n",n - ans);
    return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
const int maxn = 1e3+10;
int a[maxn];
int read()
{
    char ch = getchar(); int x = 0, f = 1;
    while (ch<'0' || ch>'9') { if (ch == '-')f = -1; ch = getchar(); }
    while (ch >= '0' && ch <= '9') { x = x * 10 + ch - '0'; ch = getchar(); }
    return x * f;
}
int main()
{
    int n , k , ans = 0 , x;
    n = read(); k = read();
    for(int i = 1; i <= n; i++) a[i] = 0;
    for(int i = 1; i <= n; i++)
    {
        x = read();
        ++a[x];
    }
    for(int i = 1; i <= k; i++)
    {
        if(a[i] & 1) ++ans;
    }
    ans = ans >> 1;
    printf("%d\n",n - ans);
    return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
const int maxn = 1e3+10;
int a[maxn];
int read()
{
    char ch = getchar(); int x = 0, f = 1;
    while (ch<'0' || ch>'9') { if (ch == '-')f = -1; ch = getchar(); }
    while (ch >= '0' && ch <= '9') { x = x * 10 + ch - '0'; ch = getchar(); }
    return x * f;
}
int main()
{
    int n , k , ans = 0 , x;
    n = read(); k = read();
    ios::sync_with_stdio(0) , cin.tie(0) , cout.tie(0);
    for(int i = 1; i <= n; i++) a[i] = 0;
    for(int i = 1; i <= n; i++)
    {
        x = read();
        ++a[x];
    }
    for(int i = 1; i <= k; i++)
    {
        if(a[i] & 1) ++ans;
    }
    ans = ans >> 1;
    printf("%d\n",n - ans);
    return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
const int maxn = 1e3+10;
int a[maxn];
int main()
{
    int n , k , ans = 0;
    scanf("%d%d",&n , &k);
    for(int i = 0; i < n; i++)
    {
        scanf("%d",&a[i]);
    }
    sort(a , a + n);
    int len;
    if(n&1) a[n] = a[n - 1] , len = n + 1;
    for(int i = 0; i < len; i+=2)
    {
        if(a[i] != a[i + 1]) ++ans;
    }
    printf("%d\n",n - ans);
    return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
const int maxn = 1e3+10;
int a[maxn];
int main()
{
    int n , k , ans = 0 , x;
    scanf("%d%d",&n , &k);
    for(int i = 1; i <= n; i++) a[i] = 0;
    for(int i = 1; i <= n; i++)
    {
        scanf("%d",&x);
        ++a[x];
    }
    for(int i = 1; i <= k; i++)
    {
        if(a[i] & 1) ++ans;
    }
    ans = ans >> 1;
    printf("%d\n",n - ans);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long i,j,n,k,arr1[1010]= {0};
    //float arrf[1010];
    cin>>n>>k;
    for(i=0; i<n; i++)
    {
        cin>>j;
        arr1[j-1]+=1;
    }
    sort(arr1,arr1+k);int sum=0;
    for(i=0;i<k;i++)
    {
        sum+=(arr1[k-i-1]/2);
    }
    int s=(n/2)+(n%2);
     s=s-sum;
    sum*=2;
    if(n-sum==0)
        cout<<sum;
    else
    {
        if((n-sum)<=s)
            cout<<n;
        else cout<<sum+s;
    }
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<string>
#include<map>
#include<set>
#define INF 0x3f3f3f3f
#define N 200+10
#define pi acos(-1.0)
#define ll long long
#define pb push_back
#define fio std::ios::sync_with_stdio(false);std::cin.tie(0);
#define mem(arr,n) memset(arr,n,sizeof(arr))
//#inlude<bits/stdc++.h>
using namespace std;
int n,k;
int main()
{
    int a[1005],n,k,m,ans,cnt;
    while(~scanf("%d%d",&n,&k))
    {
    	cnt=(n+1)/2;
    	ans=0;
    	mem(a,0);
    	for(int i=1;i<=n;i++)
    	{
    		scanf("%d",&m);
    		a[m]++;
		}
		for(int i=1;i<=n;i++)
		{
			if(a[i]%2==0)
			{
				ans+=a[i];
				cnt-=a[i]/2;
			}
		}
		sort(a+1,a+k+1);
	    for(int i=k;i>=1;i--)
	    {
	    	if(cnt==0) break;
	    	if(a[i]%2)
	    	{
	    		if(cnt-(a[i]+1)/2>=0)
	    		{
	    			ans+=a[i];
                    cnt-=((a[i]+1)/2);
				}
				else
				{
					ans+=cnt*2;
					cnt=0;
				}
			}
		}
		cout<<ans<<endl;
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<string>
#include<map>
#include<set>
#define INF 0x3f3f3f3f
#define N 200+10
#define pi acos(-1.0)
#define ll long long
#define pb push_back
#define fio std::ios::sync_with_stdio(false);std::cin.tie(0);
#define mem(arr,n) memset(arr,n,sizeof(arr))
//#inlude<bits/stdc++.h>
using namespace std;
int n,k;
int main()
{
    int a[1005],n,k,m,ans,cnt;
    while(~scanf("%d%d",&n,&k))
    {
    	cnt=0;
    	mem(a,0);
    	for(int i=1;i<=n;i++)
    	{
    		scanf("%d",&m);
    		a[m]++;
		}
		for(int i=1;i<=n;i++)
		{
			if(a[i]%2)
			{
				cnt++;
			}
		}
	    cnt/=2;
		cout<<n-cnt<<endl;
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<string>
#include<map>
#include<set>
#define INF 0x3f3f3f3f
#define N 200+10
#define pi acos(-1.0)
#define ll long long
#define pb push_back
#define fio std::ios::sync_with_stdio(false);std::cin.tie(0);
#define mem(arr,n) memset(arr,n,sizeof(arr))
//#inlude<bits/stdc++.h>
using namespace std;
int n,k;
int main()
{
    int a[1005],n,k,m,ans,cnt;
    while(~scanf("%d%d",&n,&k))
    {
    	cnt=(n+1)/2;
    	ans=0;
    	mem(a,0);
    	for(int i=1;i<=n;i++)
    	{
    		scanf("%d",&m);
    		a[m]++;
		}
		for(int i=1;i<=n;i++)
		{
			if(a[i]%2==0)
			{
				ans+=a[i];
				cnt-=a[i]/2;
			}
		}
		sort(a+1,a+k+1);
	    for(int i=k;i>1;i--)
	    {
	    	if(cnt==0) break;
	    	if(a[i]%2)
	    	{
	    		if(cnt-(a[i]+1)/2>=0)
	    		{
	    			ans+=a[i];
                    cnt-=((a[i]+1)/2);
				}
				else
				{
					ans+=cnt*2;
					cnt=0;
				}
			}
		}
		cout<<ans<<endl;
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<string>
#include<map>
#include<set>
#define INF 0x3f3f3f3f
#define N 200+10
#define pi acos(-1.0)
#define ll long long
#define pb push_back
#define fio std::ios::sync_with_stdio(false);std::cin.tie(0);
#define mem(arr,n) memset(arr,n,sizeof(arr))
//#inlude<bits/stdc++.h>
using namespace std;
int n,k;
int main()
{
    int a[1005],n,k,m,ans,cnt;
    while(~scanf("%d%d",&n,&k))
    {
    	cnt=(n+1)/2;
    	ans=0;
    	mem(a,0);
    	for(int i=1;i<=n;i++)
    	{
    		scanf("%d",&m);
    		a[m]++;
		}
		for(int i=1;i<=k;i++)
		{
			if(a[i]%2==0)
			{
				ans+=a[i];
				cnt-=(a[i]/2);
			}
		}
		sort(a+1,a+k+1);
	    for(int i=k;i>=1;i--)
	    {
	    	if(cnt==0) break;
	    	if(a[i]%2)
	    	{
	    		if(cnt-(a[i]+1)/2>=0)
	    		{
	    			ans+=a[i];
                    cnt-=((a[i]+1)/2);
				}
				else
				{
					ans+=cnt*2;
					cnt=0;
				}
			}
		}
		cout<<ans<<endl;
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<string>
#include<map>
#include<set>
#define INF 0x3f3f3f3f
#define N 200+10
#define pi acos(-1.0)
#define ll long long
#define pb push_back
#define fio std::ios::sync_with_stdio(false);std::cin.tie(0);
#define mem(arr,n) memset(arr,n,sizeof(arr))
//#inlude<bits/stdc++.h>
using namespace std;
int n,k;
int main()
{
    int a[1005],n,k,m,ans,cnt;
    while(~scanf("%d%d",&n,&k))
    {
    	cnt=(n+1)/2;
    	ans=0;
    	mem(a,0);
    	for(int i=1;i<=n;i++)
    	{
    		scanf("%d",&m);
    		a[m]++;
		}
		for(int i=1;i<=n;i++)
		{
			if(a[i]%2==0)
			{
				ans+=a[i];
				cnt-=a[i]/2;
			}
		}
	    for(int i=1;i<=n;i++)
	    {
	    	if(cnt==0) break;
	    	if(a[i]%2)
	    	{
	    		if(cnt-(a[i]+1)/2>=0)
	    		{
	    			ans+=a[i];
                    cnt-=((a[i]+1)/2);
				}
				else
				{
					ans+=cnt*2;
					cnt=0;
				}
			}
		}
		cout<<ans<<endl;
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<string>
#include<map>
#include<set>
#define INF 0x3f3f3f3f
#define N 1000+10
#define pi acos(-1.0)
#define ll long long
#define pb push_back
#define fio std::ios::sync_with_stdio(false);std::cin.tie(0);
#define mem(arr,n) memset(arr,n,sizeof(arr))
//#inlude<bits/stdc++.h>
using namespace std;
int n, k, a[N];
int main() {
    while (~scanf("%d%d", &n, &k)) {
        mem(a, 0);
        for (int i = 1, x; i <= n; ++i) {
            scanf("%d", &x);
            ++a[x];
        }
        int res = 0;
        int num = (n+1)/2;
        for (int i = 1; i <= k; ++i) {
            while (a[i] >= 2 && num > 0) {
                --num;
                a[i] -= 2;
                res += 2;
            }
        }
        printf("%d\n",res+num);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mpp make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll vis[1005];
int main()
{
    fast;
    ll n,k,cnt=0,ans=0;

    cin>>n>>k;
    for(ll i=1; i<=n; i++)
    {
        ll p;
        cin>>p;
        vis[p]++;
    }
    if(n%2!=0)
    {
        n=n/2+1;
    }
    else
    {
        n=n/2;
    }
    sort(vis+1,vis+k+1,greater<ll>());
    for(ll i=1; i<=k; i++)
    {
        //cout<<vis[i]<<endl;
    }
    while(1)
    {
        for(ll i=1; i<=k; i++)
        {
            // cout<<cnt<<endl;

            if(vis[i]%2!=0)
            {
                ans=vis[i]/2+1;
            }
            else
            {
                ans=vis[i]/2;
            }
            if(ans<n)
            {
                n=n-ans;
                cnt+=min(ans*2,vis[i]);
            }
            else if(ans==n)
            {
                cnt+=min(vis[i],ans*2);
                n=0;
            }
           else if(ans>n and n>0)
            {
                cnt+=2*n;
                n=0;
            }
            if(n==0)
            {
                cout<<cnt<<endl;
                return 0;
            }

        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mpp make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll vis[1005];
int main()
{
    fast;
    ll n,k,cnt=0,ans=0;

    cin>>n>>k;
    for(ll i=1; i<=n; i++)
    {
        ll p;
        cin>>p;
        vis[p]++;
    }
    if(n%2!=0)
    {
        n=n/2+1;
    }
    else
    {
        n=n/2;
    }
    sort(vis+1,vis+k+1,greater<ll>());
    for(ll i=1; i<=k; i++)
    {
        //cout<<vis[i]<<endl;
    }
    while(1)
    {
        for(ll i=1; i<=k; i++)
        {
            // cout<<cnt<<endl;

            if(vis[i]%2!=0)
            {
                ans=vis[i]/2+1;
            }
            else
            {
                ans=vis[i]/2;
            }
            if(ans<=n)
            {
                n=n-ans;
                cnt+=min(ans*2,vis[i]);
            }
           else if(ans>n and n!=0)
            {
                cnt+=2*n;
                n=0;
            }
            if(n==0)
            {
                cout<<cnt<<endl;
                return 0;
            }

        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mpp make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll vis[1005];
int main()
{
    fast;
    ll n,k,cnt=0,ans=0;

    cin>>n>>k;
    for(ll i=1; i<=n; i++)
    {
        ll p;
        cin>>p;
        vis[p]++;
    }
    if(n%2!=0)
    {
        n=n/2+1;
    }
    else
    {
        n=n/2;
    }
    sort(vis+1,vis+k+1,greater<ll>());
    for(ll i=1; i<=k; i++)
    {
        //cout<<vis[i]<<endl;
    }
    while(1)
    {
        for(ll i=1; i<=k; i++)
        {
            // cout<<cnt<<endl;

            if(vis[i]%2!=0)
            {
                ans=vis[i]/2+1;
            }
            else
            {
                ans=vis[i]/2;
            }
            if(ans<=n)
            {
                n=n-ans;
                cnt+=min(ans*2,vis[i]);
            }
           else if(ans>n and n>0)
            {
                cnt+=2*n;
                cout<<cnt<<endl;
                return 0;
            }

        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mpp make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll vis[1005];
int main()
{
    fast;
    ll n,k,cnt=0,ans=0;

    cin>>n>>k;
    for(ll i=1; i<=n; i++)
    {
        ll p;
        cin>>p;
        vis[p]++;
    }
    if(n%2!=0)
    {
        n=n/2+1;
    }
    else
    {
        n=n/2;
    }
    sort(vis+1,vis+k+1,greater<ll>());
    for(ll i=1; i<=k; i++)
    {
        //cout<<vis[i]<<endl;
    }
    while(1)
    {
        for(ll i=1; i<=k; i++)
        {
            // cout<<cnt<<endl;

            if(vis[i]%2!=0)
            {
                ans=vis[i]/2+1;
            }
            else
            {
                ans=vis[i]/2;
            }
            if(ans<=n)
            {
                n=n-ans;
                cnt+=vis[i];
            }
           else if(ans>n and n!=0)
            {
                cnt+=2*n;
                n=0;
            }
            if(n==0)
            {
                cout<<cnt<<endl;
                return 0;
            }

        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mpp make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll vis[1005];
int main()
{
    fast;
    ll n,k,cnt=0,ans=0;

    cin>>n>>k;
    for(ll i=1; i<=n; i++)
    {
        ll p;
        cin>>p;
        vis[p]++;
    }
    ll x=n;
    if(n%2!=0)
    {
        n=n/2+1;
    }
    else
    {
        n=n/2;
    }
    sort(vis+1,vis+k+1,greater<ll>());
    for(ll i=1; i<=k; i++)
    {
        //cout<<vis[i]<<endl;
    }

        for(ll i=1; i<=k; i++)
        {
           while(vis[i]>1 and n>0)
           {
               cnt+=2;
               vis[i]-=2;
               n--;
           }
        }
        for(ll i=1; i<=k; i++)
        {
            if(vis[i]>0 and n>0)
            {
                cnt++;
                n--;
            }
        }
        cout<<cnt<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mpp make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll vis[1005];
int main()
{
    fast;
    ll n,k,cnt=0,ans=0;

    cin>>n>>k;
    for(ll i=1; i<=n; i++)
    {
        ll p;
        cin>>p;
        vis[p]++;
    }
    ll x=n;
    if(n%2!=0)
    {
        n=n/2+1;
    }
    else
    {
        n=n/2;
    }
    sort(vis+1,vis+k+1,greater<ll>());
    for(ll i=1; i<=k; i++)
    {
        //cout<<vis[i]<<endl;
    }
    while(1)
    {
        for(ll i=1; i<=k; i++)
        {
            // cout<<cnt<<endl;
            if(n*2>vis[i] and n>0)
            {
                cnt+=vis[i];
                if(vis[i]%2==1)
                {
                    n-=vis[i]/2+1;
                }
                else
                {
                    n-=vis[i]/2;
                }
            }
            else if(n*2==vis[i] and n>0)
            {
                cnt+=vis[i];
                n=0;
            }
            else if(n*2<vis[i] and n>0)
            {
                cnt+=2*n;
                n=0;
            }
            if(n==0)
            {
               cout<<cnt<<endl;
               return 0;
            }

        }
    }
}


#include <bits/stdc++.h>
#define               ll long long int
#define               usll unsigned long long int
#define               F first
#define               S second
#define               _R return ;
#define               R return 0;
#define               pb push_back
#define               endln "\n"
#define               MAXX 200007
#define               MX 3002
#define               MOD 111539786
#define               PI 3,1415926535897
#define               sps setprecision
#define               leng(s) s.size()-1
#define               lengall(s) s.size()
#define               F0R(i , x , j , n) for(ll i = x ; i >= n ; i -= j)
#define               FOR(i , x , j , n) for(ll i = x ; i <= n ; i += j)
#define               REN(it, a) for(__typeof(a.begin()) it = a.begin(); it != a.end(); it++)
#define               ALL_OF_ME  ios_base::sync_with_stdio(false); cin.tie(NULL);
#define               debug(a) cout << (#a) << " = " << a << "\n";
#define               see(a) cout<< a << "\n";
#define               line(a) cout << a <<" ";
#define               newline cout<< "\n";
#define               space(a,b) cout << a << " " << b << "\n";
#define               goodluck_code() int main()
#define  I_too_stupid_to_solve_a_problem_BUT_I_not_too_stupid_to_realize_who_I_love return 0;
using namespace std;

template <class Object>
Object Reverse(Object obj , ll l , ll r){
	while(l < r) swap(obj[l] , obj[r]), l++ , r--;
}

template <class Object>
Object Swap(Object a , Object b){
	Object tmp = a;
			a = b;
			b = tmp;
}

template <class Object>
Object Ceil(Object a , Object b){
	if(a % b == 0){
		return a / b;
	}else{
		return a / b + 1;
	}
}

template <class Object>
Object Gcd(Object a , Object b){
	if(b == 0){
		return a;
	}else{
		return Gcd(b , a % b);
	}
}

template <class Object>
Object Loop(Object obj , ll l , ll r){
	FOR(i , l , 1 , r){
		line(obj[i])
	}
	return obj;
}

template <class Object>
Object Looppair(Object obj , ll l , ll r){
	FOR(i , l , 1 , r){
		space(obj[i].F , obj[i].S)
	}
	return obj;
}

bool zoe(const pair<ll , ll>& i ,const pair<ll , ll>& j){
	return (i.S > j.S);
}

class Start{

	public :

		ll n , k;
		ll a[MAXX];

		void LOOPER(){
			cin >> n >> k;

			FOR(i ,1 , 1 , n) cin >> a[i];

			slove(a , n , k);

		}

	private :

		void slove(ll a[] , ll n , ll k){

			ll solan = Ceil(n , 2ll);

			ll sum = 0;

			vector<pair<ll , ll> > ve;

			map<ll , ll> mp;

			map<ll , ll> :: iterator it;

			FOR(i , 1 , 1 , n) mp[a[i]]++;

			REN(it , mp){
				ve.pb(make_pair(it->F , it->S));
				sum += Ceil(it->S , 2ll);
			}

			if(k < n){
				if(sum == solan) see(n)
				else see(n - 1);
				return ;
			}

			sum = 0;

			sort(ve.begin() , ve.end() , zoe);

			FOR(i , 0 , 1 , leng(ve)){
				if(solan == 0) break;
				if(solan < Ceil(ve[i].S , 2ll)){
					solan -= solan;
					sum += Ceil(ve[i].S , 2ll);
				}else{
					solan -= Ceil(ve[i].S , 2ll);
					sum += ve[i].S;
				}
			}

			see(sum)

		}

};
Start huy;
void _love(){
	huy.LOOPER();
}
void _nang_am(){
/*
The idea bad is yours

					Or

					The idea good is your

								  		And more importantly

															this code is yours
*/
}
goodluck_code(){
  _love();
  _nang_am();
  R
}