inp = int(input())
x1, x2 = [int(i) for i in input().split()]
y1, y2 = [int(i) for i in input().split()]
z1, z2 = [int(i) for i in input().split()]

porz = [0 ,0 ,0 ]

porz[inp-1] = "x"

porz1 = porz[:]
porz1[x1 - 1] = porz[x2 - 1]
porz1[x2 - 1] = porz[x1 - 1]

porz2 = porz1[:]
porz2[y1 - 1] = porz1[y2 - 1]
porz2[y2 - 1] = porz1[y1 - 1]

porz3 = porz2[:]
porz3[z1 - 1] = porz2[z2 - 1]
porz3[z2 - 1] = porz2[z1 - 1]

print(porz3.index("x") + 1)


inp = int(input())
x1, x2 = [int(i) for i in input().split()]
y1, y2 = [int(i) for i in input().split()]
z1, z2 = [int(i) for i in input().split()]

porz = [0 ,0 ,0 ]

porz[inp-1] = 6

porz1 = porz[:]
porz1[x1 - 1] = porz[x2 - 1]
porz1[x2 - 1] = porz[x1 - 1]

porz2 = porz1[:]
porz2[y1 - 1] = porz1[y2 - 1]
porz2[y2 - 1] = porz1[y1 - 1]

porz3 = porz2[:]
porz3[z1 - 1] = porz2[z2 - 1]
porz3[z2 - 1] = porz2[z1 - 1]

print((porz3.index(6)) +  1)


import sys
sys.setrecursionlimit(20000)
inp = int(input())
x1, x2 = [int(i) for i in input().split()]
y1, y2 = [int(i) for i in input().split()]
z1, z2 = [int(i) for i in input().split()]

porz = [0 ,0 ,0 ]

porz[inp-1] = "x"

porz1 = porz[:]
porz1[x1 - 1] = porz[x2 - 1]
porz1[x2 - 1] = porz[x1 - 1]

porz2 = porz1[:]
porz2[y1 - 1] = porz1[y2 - 1]
porz2[y2 - 1] = porz1[y1 - 1]

porz3 = porz2[:]
porz3[z1 - 1] = porz2[z2 - 1]
porz3[z2 - 1] = porz2[z1 - 1]

print(porz3.index("x") + 1)


F=open('input.txt','r')
W=open('output.txt','w')
I=lambda:[*map(int,F.readline().split())]
x=I()[0]
for _ in[0]*3:
  u,v=I()
  if x==u:x=v
  elif x==v:x=u
W.write(str(x))
W.close()


x=int(input())
for _ in[0]*3:
  u,v=map(int,input().split())
  if x==u:x=v
  elif x==v:x=u
print(x)


fin=open('input.txt')
fout=open('output.txt','w')
s=fin.read().split()
for i in range(len(s)):
    s[i]=int(s[i])
nach=s[0]
s.pop(0)
for i in range(0,len(s),2):
    if s[i]==nach:
        nach=s[i+1]
    elif s[i+1]==nach:
        nach=s[i]
print(nach)


fin=open('input.txt')
fout=open('output.txt','w')
s=fin.read().split()
for i in range(len(s)):
    s[i]=int(s[i])
nach=s[0]
s.pop(0)
for i in range(0,len(s),2):
    if s[i]==nach:
        nach=s[i+1]
    elif s[i+1]==nach:
        nach=s[i]
fout.write(str(nach))
fin.close()
fout.close()


file = File.new("input.txt", "r")
pos = file.gets.to_i
a = (1..3).to_a
(1..3).each do
  x, y = file.gets.split.map{|z| z.to_i-1}
  a[x], a[y] = a[y], a[x]
end
file.close
File.open("output.txt", "w") {|file| file.write(a.find_index(pos)+1)}


idx = gets.chomp.to_i
for i in 0..2
	i1, i2 = gets.chomp.split(/ /).map!{|x|x.to_i}
	if idx == i1
		idx = i2
	elsif idx == i2
		idx = i1
	end
end
puts idx


f = open("input.txt", "r")
fw = open("output.txt", "w")
idx = f.gets.chomp.to_i
for i in 0..2
	i1, i2 = f.gets.chomp.split(/ /).map!{|x|x.to_i}
	if idx == i1
		idx = i2
	elsif idx == i2
		idx = i1
	end
end
fw.puts idx
f.close
fw.close


#!/usr/bin/ruby
a=[0]*4
a[gets.to_i]=1
while gets
	x,y=$_.split.map(&:to_i)
	a[x],a[y]=a[y],a[x]
end
puts 2
puts(a.index(1))


#!/usr/bin/ruby
f=open("output.txt","w")
a=[0]*4
a[gets.to_i]=1
while gets
	x,y=$_.split.map(&:to_i)
	a[x],a[y]=a[y],a[x]
end
f.p a
f.puts a.index(1)


#!/usr/bin/ruby
$stdin=open("input.txt","rb")
$>=open("output.txt","wb")
a=[0]*4
a[gets.to_i]=1
while gets
	x,y=$_.split.map(&:to_i)
	a[x],a[y]=a[y],a[x]
end
p a.index(1)


#!/usr/bin/ruby
$<=open("output.txt","wb")
$>=open("input.txt","wb")
a=[0]*4
a[gets.to_i]=1
while gets
	x,y=$_.split.map(&:to_i)
	a[x],a[y]=a[y],a[x]
end
p a.index(1)


#!/usr/bin/ruby
f=open("output.txt","wb")
a=[0]*4
a[gets.to_i]=1
while gets
	x,y=$_.split.map(&:to_i)
	f.puts x
	f.puts y
	a[x],a[y]=a[y],a[x]
end
f.puts(a.index(1))


#!/usr/bin/ruby
f=open("output.txt","wb")
a=[0]*4
a[gets.to_i]=1
while gets
	x,y=$_.split.map(&:to_i)
	a[x],a[y]=a[y],a[x]
end
f.puts(a.index(1))


#!/usr/bin/ruby
$<=open("input.txt","rb")
$>=open("output.txt","wb")
a=[0]*4
a[gets.to_i]=1
while gets
	x,y=$_.split.map(&:to_i)
	a[x],a[y]=a[y],a[x]
end
p a.index(1)


#!/usr/bin/ruby
f=open("output.txt","w")
a=[0]*4
a[gets.to_i]=1
while gets
	x,y=$_.split.map(&:to_i)
	a[x],a[y]=a[y],a[x]
end
f.puts a.index(1)


#!/usr/bin/ruby
a=[0]*4
a[gets.to_i]=1
while gets
	x,y=$_.split.map(&:to_i)
	a[x],a[y]=a[y],a[x]
end
puts(a.index(1))


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

main(){
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;

    vector<int> g(n);

    int c = 0;

    for(int i=0;i<k; i++){
        cin >> g[i];
        x -= g[i];
        if(g[i] < y)
            c++;
    }

    if(c >= ((n+1)/2)){
        cout << -1;
        return 0;
    }

    int ones = min(((n+1)/2) - c - 1, n-k);

    while(ones--){
        cout << 1 << " ";
    }

    x -= ones;

    if(x < 0){
        cout << -1;
        return 0;
    }

    if((n-k) > 0){
        if((y * (n-k)) > x){
            cout << -1;
            return 0;
        }

        while(k<n){
            cout << y << " ";
        }
    }

    return 0;
}


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

main(){
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;

    int z;
    int c = 0;

    for(int i=0;i<k; i++){
        cin >> z;
        x -= z;
        if(z < y)
            c++;
    }

    int ones = min(((n+1)/2) - c - 1, n-k);
    int ys = n-k-ones;

    if(c >= ((n+1)/2) || (x - ones - y * ys) < 0){
        cout << -1;
    }
    else{
        while(ones--){
            cout << 1 << " ";
        }

        while(ys--){
            cout << y << " ";
        }
    }

    return 0;
}


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

main(){
    int n, k, p, x, y;
    cin >> n >> k >> p >> x >> y;
    int s=k;

    vector<int> g(n);

    int c = 0;

    for(int i=0;i<k; i++){
        cin >> g[i];
        x -= g[i];
        if(g[i] < y)
            c++;
    }

    if(c >= ((n+1)/2) || x <= 0){
        cout << -1;
        return 0;
    }

    int f = min(((n+1)/2) - c - 1, n-k);

    while(f--){
        g[k++] = 1;
        x--;
    }

    if(x < 0){
        cout << -1;
        return 0;
    }

    if((n-k) > 0){
        if((y * (n-k)) > x){
            cout << -1;
            return 0;
        }

        int rest = x - y * (n-k);
        int elem = y + rest / (n-k);

        if(elem > p){
            cout << -1;
            return 0;
        }

        for(; k<n; k++){
            g[k] = elem;
            x-=y;
        }
    }

    for(int i=s; i<n; i++){
        cout << g[i] << " ";
    }

    return 0;
}


#include<stdio.h>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;

int main ()
{
    //freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}
    if (sum + n - k > x || sum + p * (n - k) < y) puts ("-1") ;
    else {
        int ret = x - (sum + n - k) ;
        for (int i = 0 ; i < n - k ; i ++) {
            if (ret > p - 1) {
                b[i] = p - 1 ;
                ret -= p - 1 ;
            }
            else {
                b[i] = ret ;
                ret = 0 ;
            }
        }
        for (int i = 0 ; i < n - k ; i ++) {
            printf ("%d%c" , b[i] + 1 , i == n - k - 1 ? '\n' : ' ') ;
        }
    }
    return 0 ;
}


#include<stdio.h>
#include<string.h>
#include<algorithm>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;
int c[1000 + 5] ;

int main ()
{
    //freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}

    if (sum + n - k > x ) puts ("-1") ;
    else {
        int ret = x - (sum + n - k) ;
        int l = 0 , r = 0 , mid = 0 ;
        a[k] = y ;
        for (int i = 0 ; i <= k ; i ++) {
            if (a[i] < y ) l ++ ;
            else if (a[i] > y )r ++ ;
            else mid ++ ;
        }
        mid -- ;
       // printf ("l=%d,mid=%d,r=%d\n" , l , mid , r ) ;
        l = n / 2 - l ;
        r = n / 2 - r ;
       // printf ("l=%d,mid=%d,r=%d\n" , l , mid , r ) ;
        if ( l < 0 || r < 0){
            puts ("-1") ;
            return 0 ;
        }
        if (mid > 0) {
            if (mid >= r) {
                mid -= r ;
                r = 0 ;
            }
            else {
                r -= mid ;
                mid = 0 ;
            }
           // printf ("l=%d,mid=%d,r=%d\n" , l , mid , r ) ;
            if (mid > 0) {
                l -= mid ;
            }
        }
        if ( l < 0 || r < 0){
            puts ("-1") ;
            return 0 ;
        }
      //  printf ("l=%d,r=%d\n" , l , r ) ;
        for (int i = 0 ; i < l ; i ++) b[i] = 1 ;
        for (int i = l ; i < l + r ; i ++) b[i] = y ;
        if ( r * (y - 1) > ret ) puts ("-1") ;
        else {
            b[l + r] = y ;
            for (int i = 0 ; i <= l + r ; i ++)
                printf ("%d%c" , b[i] , i == l + r  ? '\n' : ' ') ;
        }
    }
    return 0 ;
}


#include<stdio.h>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;

int main ()
{
    //freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}
    if (sum + n - k > x || sum + p * (n - k) < y) puts ("-1") ;
    else {
        int ret = x - (sum + n - k) ;
        sum = 0 ;
        memset (b , 0  , sizeof(b)) ;
        for (int i = 0 ; i < n - k ; i ++) {
            if (ret > p - 1) {
                b[i] = p - 1 ;
                ret -= p - 1 ;
            }
            else {
                b[i] = ret ;
                ret = 0 ;
            }
            sum += b[i] ;
        }
        if (sum + n - k < y) puts ("-1") ;
        else
        for (int i = 0 ; i < n - k ; i ++) {
            printf ("%d%c" , b[i] + 1 , i == n - k - 1 ? '\n' : ' ') ;
        }
    }
    return 0 ;
}


#include<stdio.h>
#include<string.h>
#include<algorithm>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;

int main ()
{
    //freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}

    if (sum + n - k > x ) puts ("-1") ;
    else {
        int ret = x - (sum + n - k) ;
        for (int i = k ; i < n ; i ++) {
            if (ret > p - 1) {
                a[i] = p ;
                ret -= p - 1 ;
            }
            else {
                a[i] = ret + 1 ;
                ret = 0 ;
            }
        }
        for (int i = 0 ; i < n ; i ++)
            b[i] = a[i] ;
        std::sort (a , a + n ) ;
        //printf ("x=%d\n" , x ) ;
       // for (int i = 0 ; i < n ; i ++) printf ("%d " , a[i]) ;puts ("") ;
        if (a[n/2] < y) puts ("-1") ;
        else
        for (int i = k ; i < n ; i ++) {
            printf ("%d%c" , b[i] , i == n - 1 ? '\n' : ' ') ;
        }
    }
    return 0 ;
}


#include<stdio.h>
#include<string.h>
#include<algorithm>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;
int c[1000 + 5] ;

int main ()
{
  //  freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}

    if (sum + n - k > x ) puts ("-1") ;
    else {
        int ret = x - (sum + n - k) ;
        int l = 0 , r = 0 , mid = 0 ;
        for (int i = 0 ; i < k ; i ++) {
            if (a[i] < y ) l ++ ;
            else if (a[i] > y )r ++ ;
            else mid ++ ;
        }
        l = (n - 1) / 2 - l ;
        r = (n - 1) / 2 - r ;
        if (mid > 1)
        r -= mid - 1 ;
        //printf ("l=%d , r = %d\n" , l , r ) ;
        int sum = 0 ;
        for (int i = 0 ; i < l ; i ++) b[i] = 1 ;
        for (int i = l ; i < l + r ; i ++) b[i] = y ;
        if ( r * (y - 1) > ret ) puts ("-1") ;
        else
        for (int i = 0 ; i < l + r ; i ++)
            printf ("%d%c" , b[i] , i == l + r - 1 ? '\n' : ' ') ;
    }
    return 0 ;
}


#include<stdio.h>
#include<string.h>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;

int main ()
{
    //freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}
    if (sum + n - k > x || sum + p * (n - k) < y) puts ("-1") ;
    else {
        memset (b , 0 , sizeof(b)) ;
        int ret = x - (sum + n - k) ;
        for (int i = 0 ; i < n - k ; i ++) {
            if (ret > p - 1) {
                b[i] = p - 1 ;
                ret -= p - 1 ;
            }
            else {
                b[i] = ret ;
                ret = 0 ;
            }
        }
        for (int i = 0 ; i < n - k ; i ++) {
            printf ("%d%c" , b[i] + 1 , i == n - k - 1 ? '\n' : ' ') ;
        }
    }
    return 0 ;
}


#include<stdio.h>
#include<string.h>
#include<algorithm>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;
int c[1000 + 5] ;

int main ()
{
   // freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}

    if (sum + n - k > x ) puts ("-1") ;
    else {
        int ret = x - (sum + n - k) ;
        int l = 0 , r = 0 ;
        for (int i = 0 ; i < k ; i ++) {
            if (a[i] < y) l ++ ;
            else r ++ ;
        }
        if (l > n / 2) {
            puts ("-1") ;
            return 0 ;
        }
        if (r > n / 2) {
            for (int i = 0 ; i < n - k ; i ++)
                printf ("1%c" , i == n - k - 1 ? '\n' : ' ') ;
            return 0 ;
        }
        l = n/2 - l ;
        r = n/2 + 1 - r ;
        for (int i = 0 ; i < l ; i ++) b[i] = 1 ;
        for (int i = l ; i < l + r ; i ++) b[i] = y ;
        if (r * (y - 1) > ret) puts ("-1") ;
        else {
            for (int i = 0 ; i < l + r ; i ++)
                printf ("%d%c" , b[i] , i == l + r - 1 ? '\n': ' ') ;
        }
    }
    return 0 ;
}


#include<stdio.h>
#include<string.h>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;

int main ()
{
    //freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}
    if (sum + n - k > x || sum + p * (n - k) < y) puts ("-1") ;
    else {
        int ret = x - (sum + n - k) ;
        sum = 0 ;
        memset (b , 0  , sizeof(b)) ;
        for (int i = 0 ; i < n - k ; i ++) {
            if (ret > p - 1) {
                b[i] = p - 1 ;
                ret -= p - 1 ;
            }
            else {
                b[i] = ret ;
                ret = 0 ;
            }
            sum += b[i] ;
        }
        if (sum + n - k < y) puts ("-1") ;
        else
        for (int i = 0 ; i < n - k ; i ++) {
            printf ("%d%c" , b[i] + 1 , i == n - k - 1 ? '\n' : ' ') ;
        }
    }
    return 0 ;
}


#include<stdio.h>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;

int main ()
{
    //freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}
    if (sum + n - k > x || sum + p * (n - k) < y) puts ("-1") ;
    else {
        memset (b , 0 , sizeof(b)) ;
        int ret = x - (sum + n - k) ;
        for (int i = 0 ; i < n - k ; i ++) {
            if (ret > p - 1) {
                b[i] = p - 1 ;
                ret -= p - 1 ;
            }
            else {
                b[i] = ret ;
                ret = 0 ;
            }
        }
        for (int i = 0 ; i < n - k ; i ++) {
            printf ("%d%c" , b[i] + 1 , i == n - k - 1 ? '\n' : ' ') ;
        }
    }
    return 0 ;
}


#include<stdio.h>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;

int main ()
{
    //freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}
    if (sum + n - k > x || sum + p * (n - k) < y) puts ("-1") ;
    else {
        int ret = x - (sum + n - k) ;
        sum = 0 ;
        for (int i = 0 ; i < n - k ; i ++) {
            if (ret > p - 1) {
                b[i] = p - 1 ;
                ret -= p - 1 ;
            }
            else {
                b[i] = ret ;
                ret = 0 ;
            }
            sum += b[i] ;
        }
        if (sum < y) puts ("-1") ;
        else
        for (int i = 0 ; i < n - k ; i ++) {
            printf ("%d%c" , b[i] + 1 , i == n - k - 1 ? '\n' : ' ') ;
        }
    }
    return 0 ;
}


#include<stdio.h>
int n , k , p , x , y ;
int a[1000 + 5] ;
int b[1000 + 5] ;

int main ()
{
    //freopen ("a.txt" , "r" , stdin ) ;
    scanf ("%d%d%d%d%d" , &n , &k , &p , &x , &y ) ;
    int sum = 0 ;
    for (int i = 0 ; i < k ; i ++) {scanf ("%d" , &a[i]) ; sum += a[i];}
    if (sum + n - k > x || sum + p * (n - k) < y) puts ("-1") ;
    else {
        int ret = x - (sum + n - k) ;
        sum = 0 ;
        for (int i = 0 ; i < n - k ; i ++) {
            if (ret > p - 1) {
                b[i] = p - 1 ;
                ret -= p - 1 ;
            }
            else {
                b[i] = ret ;
                ret = 0 ;
            }
            sum += b[i] ;
        }
        if (sum + n - k < y) puts ("-1") ;
        else
        for (int i = 0 ; i < n - k ; i ++) {
            printf ("%d%c" , b[i] + 1 , i == n - k - 1 ? '\n' : ' ') ;
        }
    }
    return 0 ;
}


#include<bits/stdc++.h>
#define f2(i,a,b) for(int i=0;i<b;i++)
using namespace std;
int main()
{
    int a,b,c,d,e,x;
    int arr[10000];
    cin>>a>>b>>c>>d>>e;
    f2(i,0,a)
        arr[i]=1;

        int sum=0,count=0;
    for(int i=0;i<b;i++)
    {
        cin>>x;
        if(x<e)
          count++;
        sum+=x;
        arr[i]=x;
    }
     if(a==1)
        {
            if(e>d)
            {

            cout<<-1<<"\n";
            return 0;
            }

        }
            if(d<(sum+(a-b)*1))
        {
            cout<<-1<<"\n";
            return 0;
        }

    sort(arr,arr+a);
    int mid=(a/2)+1;
     mid--;
    if(arr[mid]>=e)
    {
          for(int i=1;i<=a-b;i++)
             {
               cout<<1<<" ";
             }
       return 0;
    }
    else if((e*count)+(((a-b)-count)*1)+sum>d)
    {
        cout<<-1<<"\n";
            return 0;
    }
    else
    {
        cout<<1<<" ";
        for(int i=1;i<=count;i++)
              cout<<e<<" ";
    }

    return 0;
}


#include<bits/stdc++.h>
#define f2(i,a,b) for(int i=0;i<b;i++)
using namespace std;
int main()
{
    int a,b,c,d,e,x;
    int arr[10000];
    cin>>a>>b>>c>>d>>e;
    f2(i,0,a)
        arr[i]=1;

        int sum=0,count=0;
    for(int i=0;i<b;i++)
    {
        cin>>x;
        if(x<e)
          count++;
        sum+=x;
        arr[i]=x;
    }
            if(d<(sum+(a-b)*1))
        {
            cout<<-1<<"\n";
            return 0;
        }

    sort(arr,arr+a);
    int mid=(a/2)+1;
     mid--;
    if(arr[mid]>=e)
    {
          for(int i=1;i<=a-b;i++)
             {
               cout<<1<<" ";
             }
       return 0;
    }
    else if((e*count)+((b-count)*1)+sum>d)
    {
        cout<<-1<<"\n";
            return 0;
    }
    else
    {
        cout<<1<<" ";
        for(int i=1;i<=count;i++)
              cout<<e<<" ";
    }

    return 0;
}


#include<bits/stdc++.h>
#define f2(i,a,b) for(int i=0;i<b;i++)
using namespace std;
int main()
{
    int a,b,c,d,e,x;
    int arr[10000];
    cin>>a>>b>>c>>d>>e;
    f2(i,0,a)
        arr[i]=1;

        int sum=0,count=0;
    for(int i=0;i<b;i++)
    {
        cin>>x;
        if(x<e)
          count++;
        sum+=x;
        arr[i]=x;
    }
            if(d<(sum+(a-b)*1))
        {
            cout<<-1<<"\n";
            return 0;
        }

    sort(arr,arr+a);
    int mid=(a/2)+1;
     mid--;
    if(arr[mid]>=e)
    {
        cout<<mid<<" ";
          for(int i=1;i<a-b;i++)
             {
               cout<<1<<" ";
             }
       return 0;
    }
    else if((e*count)+((b-count)*1)>d)
    {
        cout<<-1<<"\n";
            return 0;
    }
    else
    {
        cout<<1<<" ";
        for(int i=1;i<=count;i++)
              cout<<e<<" ";
    }

    return 0;
}


#include<bits/stdc++.h>
#define f2(i,a,b) for(int i=0;i<b;i++)
using namespace std;
int main()
{
    int a,b,c,d,e,x;
    int arr[10000];
    cin>>a>>b>>c>>d>>e;
    f2(i,0,a)
        arr[i]=1;

        int sum=0,count=0;
    for(int i=0;i<b;i++)
    {
        cin>>x;
        sum+=x;
        arr[i]=x;
    }

            if(d<(sum+(a-b)*1))
        {
            cout<<-1<<"\n";
            return 0;
        }

    sort(arr,arr+a);
    int mid=(a/2)+1;
          mid--;
          for(int i=mid;i<a;i++)
          {
              if(arr[i]<e)
              {
                  count++;
              }

          }
    if(arr[mid]>=e)
    {
          for(int i=1;i<=a-b;i++)
             {
               cout<<1<<" ";
             }
       return 0;
    }
        else if((e*count)+(((a-b)-count)*1)+sum>d)
    {
        cout<<-1<<"\n";
            return 0;
    }
    else
    {
        for(int i=1;i<(a-b)-count;i++)
                 cout<<1<<" ";

        for(int i=1;i<=count;i++)
              cout<<e<<" ";

    }

    return 0;
}


#include<bits/stdc++.h>
#define f2(i,a,b) for(int i=0;i<b;i++)
using namespace std;
int main()
{
    int a,b,c,d,e,x;
    int arr[10000];
    cin>>a>>b>>c>>d>>e;
    f2(i,0,a)
        arr[i]=1;

        int sum=0,count=0;
    for(int i=0;i<b;i++)
    {
        cin>>x;
        if(x<e)
          count++;
        sum+=x;
        arr[i]=x;
    }
            if(d<(sum+(a-b)*1))
        {
            cout<<-1<<"\n";
            return 0;
        }

    sort(arr,arr+a);
    int mid=(a/2)+1;
     mid--;
    if(arr[mid]>=e)
    {
          for(int i=1;i<=a-b;i++)
             {
               cout<<1<<" ";
             }
       return 0;
    }
    else if((e*count)+(((a-b)-count)*1)+sum>d)
    {
        cout<<-1<<"\n";
            return 0;
    }
    else
    {
        cout<<1<<" ";
        for(int i=1;i<=count;i++)
              cout<<e<<" ";
    }

    return 0;
}


#include<bits/stdc++.h>
#define f2(i,a,b) for(int i=0;i<b;i++)
using namespace std;
int main()
{
    int a,b,c,d,e,x;
    int arr[10000];
    cin>>a>>b>>c>>d>>e;
    f2(i,0,a)
        arr[i]=1;

        int sum=0,count=0;
    for(int i=0;i<b;i++)
    {
        cin>>x;
        sum+=x;
        arr[i]=x;
    }

            if(d<(sum+(a-b)*1))
        {
            cout<<-1<<"\n";
            return 0;
        }

    sort(arr,arr+a);
    int mid=(a/2)+1;
          mid--;
          for(int i=mid;i<a;i++)
          {
              if(arr[i]<e)
              {
                  count++;
              }

          }
    if(arr[mid]>=e)
    {
          for(int i=1;i<=a-b;i++)
             {
               cout<<1<<" ";
             }
       return 0;
    }
        else if((e*count)+(((a-b)-count)*1)+sum>d)
    {
        cout<<-1<<"\n";
            return 0;
    }
    else
    {
        if(e>c||count>a-b)
        {
            cout<<-1<<"\n";
            return 0;
        }
        for(int i=1;i<=(a-b)-count;i++)
                 cout<<1<<" ";

        for(int i=1;i<=count;i++)
              cout<<e<<" ";

    }

    return 0;
}


#include<bits/stdc++.h>
#define f2(i,a,b) for(int i=0;i<b;i++)
using namespace std;
int main()
{
    int a,b,c,d,e,x;
    int arr[10000];
    cin>>a>>b>>c>>d>>e;
    f2(i,0,a)
        arr[i]=1;

        int sum=0,count=0;
    for(int i=0;i<b;i++)
    {
        cin>>x;
        if(x<e)
          count++;
        sum+=x;
        arr[i]=x;
    }
            if(d<(sum+(a-b)*1))
        {
            cout<<-1<<"\n";
            return 0;
        }

    sort(arr,arr+a);
    int mid=(a/2)+1;
     mid--;
    if(arr[mid]>=e)
    {
          for(int i=1;i<=a-b;i++)
             {
               cout<<1<<" ";
             }
       return 0;
    }
    else if((e*count)+((b-count)*1)>d)
    {
        cout<<-1<<"\n";
            return 0;
    }
    else
    {
        cout<<1<<" ";
        for(int i=1;i<=count;i++)
              cout<<e<<" ";
    }

    return 0;
}


#include<bits/stdc++.h>
#define f2(i,a,b) for(int i=0;i<b;i++)
using namespace std;
int main()
{
    int a,b,c,d,e,x;
    int arr[10000];
    cin>>a>>b>>c>>d>>e;
    f2(i,0,a)
        arr[i]=1;

        int sum=0,count=0;
    for(int i=0;i<b;i++)
    {
        cin>>x;
        sum+=x;
        arr[i]=x;
    }

            if(d<(sum+(a-b)*1))
        {
            cout<<-1<<"\n";
            return 0;
        }

    sort(arr,arr+a);
    int mid=(a/2)+1;
          mid--;
          for(int i=mid;i<a;i++)
          {
              if(arr[i]<e)
              {
                  count++;
              }

          }
    if(arr[mid]>=e)
    {
          for(int i=1;i<=a-b;i++)
             {
               cout<<1<<" ";
             }
       return 0;
    }
        else if((e*count)+(((a-b)-count)*1)+sum>d)
    {
        cout<<-1<<"\n";
            return 0;
    }
    else
    {
        for(int i=1;i<=(a-b)-count;i++)
                 cout<<1<<" ";

        for(int i=1;i<=count;i++)
              cout<<e<<" ";

    }

    return 0;
}


#include<bits/stdc++.h>
#define f2(i,a,b) for(int i=0;i<b;i++)
using namespace std;
int main()
{
    int a,b,c,d,e,x;
    int arr[10000];
    cin>>a>>b>>c>>d>>e;
    f2(i,0,a)
        arr[i]=1;

        int sum=0,count=0;
    for(int i=0;i<b;i++)
    {
        cin>>x;
        if(x<e)
          count++;
        sum+=x;
        arr[i]=x;
    }
     if(a==1)
        {
            if(e>d)
            {

            cout<<-1<<"\n";
            return 0;
            }
            if(e==d && c<e)
            {
            cout<<-1<<"\n";
            return 0;
            }
            if(e==d)
            {
            cout<<e<<"\n";
            return 0;
            }

        }
            if(d<(sum+(a-b)*1))
        {
            cout<<-1<<"\n";
            return 0;
        }

    sort(arr,arr+a);
    int mid=(a/2)+1;
     mid--;
    if(arr[mid]>=e)
    {
          for(int i=1;i<=a-b;i++)
             {
               cout<<1<<" ";
             }
       return 0;
    }
    else if((e*count)+(((a-b)-count)*1)+sum>d)
    {
        cout<<-1<<"\n";
            return 0;
    }
    else
    {
        cout<<1<<" ";
        for(int i=1;i<=count;i++)
              cout<<e<<" ";
    }

    return 0;
}


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

#define fto(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define fdw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#define out(x,y) cout << x << y
#define out3(x,y,z) cout << x << y << z
#define debug(a) cout << #a << " = " << a << endl
#define ooLL 1000000000000LL
#define oo 1000000000
#define maxn 100005
#define eps 0.000000001

#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp(x,y) make_pair(x, y)

vector<int> a;
int n,k,p,x,y,t;
long long sum,need,num, best;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("in.inp","r",stdin);
    freopen("ou.out","w",stdout);
    #endif

    cin >> n >> k >> p >> x >> y;

    sum = 0;   a.clear();
    fto(i,1,k) {
        cin >> t;
        a.push_back(t);
        sum += a[i-1];
    }
    sort(a.begin(),a.end());
    if (sum>x) {
        cout << -1;
        return 0;
    }

    fto(i,1,n-k)

    need = x - sum;
    if (p*(n-k)<need || need<n) {
        cout << -1;
        return 0;
    }

    best = 0;
    fto(i,1,n-k)
        if ((i*y+n-k-i)<=need) best = i;

    fto(i,1,best) a.push_back(y);
    fto(i,1,n-k-best) a.push_back(1);

    sort(a.begin(),a.end());
    //debug(best);

    if (a[(a.size()+1)/2-1]>=y) {
        fto(i,1,best) cout << y << " ";
        fto(i,1,n-k-best) cout << 1;
    }
    else return -1;
}


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

#define fto(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define fdw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#define out(x,y) cout << x << y
#define out3(x,y,z) cout << x << y << z
#define debug(a) cout << #a << " = " << a << endl
#define ooLL 1000000000000LL
#define oo 1000000000
#define maxn 100005
#define eps 0.000000001

#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp(x,y) make_pair(x, y)

vector<int> a;
int n,k,p,x,y,t;
long long sum,need,num, best;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("in.inp","r",stdin);
    freopen("ou.out","w",stdout);
    #endif

    cin >> n >> k >> p >> x >> y;

    sum = 0;
    fto(i,1,k) {
        cin >> t;
        a.push_back(t);
        sum += a[i-1];
    }
    sort(a.begin(),a.end());
    if (k==n && sum<=x && a[(a.size()+1)/2-1]>=y) return 0;
    else {
        cout << -1;
        return 0;
    }

    need = x - sum;
    if (p*(n-k)<need || need<n) {
        cout << -1;
        return 0;
    }

    best = 0;
    fto(i,1,n-k)
        if ((need - i*y)>=n-k-i && (need -i*y)<=(n-k-i)*p) best = i;

    fto(i,1,best) a.push_back(y);
    fto(i,1,n-k-best) a.push_back(1);

    sort(a.begin(),a.end());
    //debug(best);

    if (a[(a.size()+1)/2-1]>=y) {
        fto(i,1,best) cout << y << " ";
        fto(i,1,n-k-best) cout << 1;
    }
    else return -1;
}


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

#define fto(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define fdw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#define out(x,y) cout << x << y
#define out3(x,y,z) cout << x << y << z
#define debug(a) cout << #a << " = " << a << endl
#define ooLL 1000000000000LL
#define oo 1000000000
#define maxn 100005
#define eps 0.000000001

#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp(x,y) make_pair(x, y)

vector<int> a;
long long n,k,p,x,y,t;
long long sum,need,num, best;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("in.inp","r",stdin);
    freopen("ou.out","w",stdout);
    #endif

    cin >> n >> k >> p >> x >> y;

    sum = 0;   a.clear();
    fto(i,1,k) {
        cin >> t;
        a.push_back(t);
        sum += a[i-1];
    }
    if (sum>x) {
        cout << -1;
        return 0;
    }

    need = x - sum;
    if (need<n-k) {
        cout << -1;
        return 0;
    }

    best = 0;
    fto(i,1,n-k)
        if ((y*i+n-k-i)<=need) best = i;

    fto(i,1,best) a.push_back(y);
    fto(i,1,n-k-best) a.push_back(1);

    sort(a.begin(),a.end());

 //   debug(a[(a.size()+1)/2-1]);
    //fto(i,0,a.size()-1) debug(a[i]);
    //debug(a.size());
    if (a[(a.size()+1)/2-1]>=y) {
        fto(i,1,best) cout << y << " ";
        fto(i,1,n-k-best) cout << 1 << " ";
    }
    else {
        cout << -1;
        return 0;
    }
}


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

#define fto(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define fdw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#define out(x,y) cout << x << y
#define out3(x,y,z) cout << x << y << z
#define debug(a) cout << #a << " = " << a << endl
#define ooLL 1000000000000LL
#define oo 1000000000
#define maxn 100005
#define eps 0.000000001

#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp(x,y) make_pair(x, y)

vector<int> a;
int n,k,p,x,y,t;
long long sum,need,num, best;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("in.inp","r",stdin);
    freopen("ou.out","w",stdout);
    #endif

    cin >> n >> k >> p >> x >> y;

    sum = 0;
    fto(i,1,k) {
        cin >> t;
        a.push_back(t);
        sum += a[i-1];
    }
    //debug(sum);

    need = x - sum;
    if (p*(n-k)<need || need<n) {
        cout << -1;
        return 0;
    }

    best = 0;
    fto(i,1,n-k)
        if ((need - i*y)>=n-k-i && (need -i*y)<=(n-k-i)*p) best = i;

    fto(i,1,best) a.push_back(y);
    fto(i,1,n-k-best) a.push_back(1);

    sort(a.begin(),a.end());
    //debug(best);

    if (a[(a.size()+1)/2-1]>=y) {
        fto(i,1,best) cout << y << " ";
        fto(i,1,n-k-best) cout << 1;
    }
    else return -1;
}


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

#define fto(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define fdw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#define out(x,y) cout << x << y
#define out3(x,y,z) cout << x << y << z
#define debug(a) cout << #a << " = " << a << endl
#define ooLL 1000000000000LL
#define oo 1000000000
#define maxn 100005
#define eps 0.000000001

#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp(x,y) make_pair(x, y)

vector<int> a;
long long n,k,p,x,y,t;
long long sum,need,num, best;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("in.inp","r",stdin);
    freopen("ou.out","w",stdout);
    #endif

    cin >> n >> k >> p >> x >> y;

    sum = 0;   a.clear();
    fto(i,1,k) {
        cin >> t;
        a.push_back(t);
        sum += a[i-1];
    }
    sort(a.begin(),a.end());
    if (sum>x) {
        cout << -1;
        return 0;
    }

    fto(i,1,n-k)

    need = x - sum;
    if (need<n-k) {
        cout << -1;
        return 0;
    }

    best = 0;
    fto(i,1,n-k)
        if ((i*y+n-k-i)<=need) best = i;

    fto(i,1,best) a.push_back(y);
    fto(i,1,n-k-best) a.push_back(1);

    sort(a.begin(),a.end());
    //debug(best);

    //debug(a[(a.size()+1)/2-1]);
    if (a[(a.size()+1)/2-1]>=y) {
        fto(i,1,best) cout << y << " ";
        fto(i,1,n-k-best) cout << 1 << " ";
    }
    else return -1;
}


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

#define fto(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define fdw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#define out(x,y) cout << x << y
#define out3(x,y,z) cout << x << y << z
#define debug(a) cout << #a << " = " << a << endl
#define ooLL 1000000000000LL
#define oo 1000000000
#define maxn 100005
#define eps 0.000000001

#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp(x,y) make_pair(x, y)

vector<int> a;
int n,k,p,x,y,t;
long long sum,need,num, best;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("in.inp","r",stdin);
    freopen("ou.out","w",stdout);
    #endif

    cin >> n >> k >> p >> x >> y;

    sum = 0;
    fto(i,1,k) {
        cin >> t;
        a.push_back(t);
        sum += a[i-1];
    }
    //debug(sum);

    need = x - sum;
    if (p*(n-k)<need || need<n) {
        cout << -1;
        return 0;
    }

    best = 0;
    fto(i,1,n-k)
        if ((need - i*y)>=n-k-i) best = i;

    fto(i,1,best) a.push_back(y);
    fto(i,1,n-k-best) a.push_back(1);

    sort(a.begin(),a.end());
    //debug(best);

    if (a[(a.size()+1)/2-1]>=y) {
        fto(i,1,best) cout << y << " ";
        fto(i,1,n-k-best) cout << 1;
    }
    else return -1;
}


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

#define fto(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define fdw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#define out(x,y) cout << x << y
#define out3(x,y,z) cout << x << y << z
#define debug(a) cout << #a << " = " << a << endl
#define ooLL 1000000000000LL
#define oo 1000000000
#define maxn 100005
#define eps 0.000000001

#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp(x,y) make_pair(x, y)

vector<int> a;
int n,k,p,x,y,t;
long long sum,need,num, best;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("in.inp","r",stdin);
    freopen("ou.out","w",stdout);
    #endif

    cin >> n >> k >> p >> x >> y;

    sum = 0;
    fto(i,1,k) {
        cin >> t;
        a.push_back(t);
        sum += a[i-1];
    }
    sort(a.begin(),a.end());
    if (k==n)
        if (sum<=x && a[(a.size()+1)/2-1]>=y) return 0;
        else {
            cout << -1;
            return 0;
        }

    need = x - sum;
    if (p*(n-k)<need || need<n) {
        cout << -1;
        return 0;
    }

    best = 0;
    fto(i,1,n-k)
        if ((need - i*y)>=n-k-i && (need -i*y)<=(n-k-i)*p) best = i;

    fto(i,1,best) a.push_back(y);
    fto(i,1,n-k-best) a.push_back(1);

    sort(a.begin(),a.end());
    //debug(best);

    if (a[(a.size()+1)/2-1]>=y) {
        fto(i,1,best) cout << y << " ";
        fto(i,1,n-k-best) cout << 1;
    }
    else return -1;
}


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

#define fto(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define fdw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#define out(x,y) cout << x << y
#define out3(x,y,z) cout << x << y << z
#define debug(a) cout << #a << " = " << a << endl
#define ooLL 1000000000000LL
#define oo 1000000000
#define maxn 100005
#define eps 0.000000001

#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp(x,y) make_pair(x, y)

vector<int> a;
int n,k,p,x,y,t;
long long sum,need,num, best;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("in.inp","r",stdin);
    freopen("ou.out","w",stdout);
    #endif

    cin >> n >> k >> p >> x >> y;

    sum = 0;   a.clear();
    fto(i,1,k) {
        cin >> t;
        a.push_back(t);
        sum += a[i-1];
    }
    sort(a.begin(),a.end());
    if (sum>x) {
        cout << -1;
        return 0;
    }

    fto(i,1,n-k)

    need = x - sum;
    if (need<n) {
        cout << -1;
        return 0;
    }

    best = 0;
    fto(i,1,n-k)
        if ((i*y+n-k-i)<=need) best = i;

    fto(i,1,best) a.push_back(y);
    fto(i,1,n-k-best) a.push_back(1);

    sort(a.begin(),a.end());
    //debug(best);

    if (a[(a.size()+1)/2-1]>=y) {
        fto(i,1,best) cout << y << " ";
        fto(i,1,n-k-best) cout << 1;
    }
    else return -1;
}


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

#define fto(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define fdw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#define out(x,y) cout << x << y
#define out3(x,y,z) cout << x << y << z
#define debug(a) cout << #a << " = " << a << endl
#define ooLL 1000000000000LL
#define oo 1000000000
#define maxn 100005
#define eps 0.000000001

#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp(x,y) make_pair(x, y)

vector<int> a;
int n,k,p,x,y,t;
long long sum,need,num, best;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("in.inp","r",stdin);
    freopen("ou.out","w",stdout);
    #endif

    cin >> n >> k >> p >> x >> y;

    sum = 0;   a.clear();
    fto(i,1,k) {
        cin >> t;
        a.push_back(t);
        sum += a[i-1];
    }
    sort(a.begin(),a.end());
    if (sum>x) {
        cout << -1;
        return 0;
    }

    fto(i,1,n-k)

    need = x - sum;
    if (need<n-k) {
        cout << -1;
        return 0;
    }

    best = 0;
    fto(i,1,n-k)
        if ((i*y+n-k-i)<=need) best = i;

    fto(i,1,best) a.push_back(y);
    fto(i,1,n-k-best) a.push_back(1);

    sort(a.begin(),a.end());
    //debug(best);

    //debug(a[(a.size()+1)/2-1]);
    if (a[(a.size()+1)/2-1]>=y) {
        fto(i,1,best) cout << y << " ";
        fto(i,1,n-k-best) cout << 1 << " ";
    }
    else return -1;
}


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

#define fto(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define fdw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define fill(ar, val) memset(ar, val, sizeof(ar))
#define out(x,y) cout << x << y
#define out3(x,y,z) cout << x << y << z
#define debug(a) cout << #a << " = " << a << endl
#define ooLL 1000000000000LL
#define oo 1000000000
#define maxn 100005
#define eps 0.000000001

#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp(x,y) make_pair(x, y)

vector<int> a;
int n,k,p,x,y,t;
long long sum,need,num, best;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("in.inp","r",stdin);
    freopen("ou.out","w",stdout);
    #endif

    cin >> n >> k >> p >> x >> y;

    sum = 0;   a.clear();
    fto(i,1,k) {
        cin >> t;
        a.push_back(t);
        sum += a[i-1];
    }
    sort(a.begin(),a.end());
    if (sum>x) {
        cout << -1;
        return 0;
    }

    fto(i,1,n-k)

    need = x - sum;

    best = 0;
    fto(i,1,n-k)
        if ((i*y+n-k-i)<=need) best = i;

    fto(i,1,best) a.push_back(y);
    fto(i,1,n-k-best) a.push_back(1);

    sort(a.begin(),a.end());
    //debug(best);

    if (a[(a.size()+1)/2-1]>=y) {
        fto(i,1,best) cout << y << " ";
        fto(i,1,n-k-best) cout << 1;
    }
    else return -1;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,l=0,a[1000000],c,h;
int main()
{
    cin>>n>>k>>p>>x>>y;
    for(i=1;i<=k;i++)
    {
        cin>>a[i];
        if (a[i]>=y) l++;
        s+=a[i];
    }
    long long s1=0;
    if (x<=s) {cout<<"-1"<<endl;} else
        {

            c=(x-s-s1)/(n-k-((n+1)/2)+l);
            h=(x-s-s1)%(n-k-((n+1)/2)+l);
            s1+=y*(((n+1)/2)-l);
            if (c>=1)
            {
            for(i=1;i<=((n+1)/2)-l;i++)
            {
                a[i]=y;
                cout<<a[i]<<" ";
            }
            for(i=1;i<=n-k-((n+1)/2)+l;i++)
            {
                a[i]=c;
                if (i<h) {a[i]++;}
                cout<<a[i]<<" ";
            }
            }
            else cout<<-1<<endl;
        }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,l=0,a[1000000],c,h;
int main()
{
    cin>>n>>k>>p>>x>>y;
    for(i=1;i<=k;i++)
    {
        cin>>a[i];
        if (a[i]>=y) l++;
        s+=a[i];
    }
    long long s1;
    if (x<=s) {cout<<"-1"<<endl;} else
        {
            s1=y*(((n+1)/2)-l);
            if (n-k-((n+1)/2)+l>0)
            {
            c=(x-s-s1)/(n-k-((n+1)/2)+l);
            h=(x-s-s1)%(n-k-((n+1)/2)+l);
            if (c>=1)
            {
            for(i=1;i<=((n+1)/2)-l;i++)
            {
                a[i]=y;
                cout<<a[i]<<" ";
            }
            for(i=1;i<=n-k-((n+1)/2)+l;i++)
            {
                a[i]=c;
                if (i<h) {a[i]++;}
                cout<<a[i]<<" ";
            }
            }
            else cout<<-1<<endl;

            }
            else cout<<-1<<endl;
        }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,l=0,r=0,a[1000000],h;
int main()
{
    cin>>n>>k>>p>>x>>y;
    if (n % 2==0) h=1; else h=0;
    for(i=1;i<=k;i++)
    {
        cin>>a[i];
        if (a[i]<y) l++; else r++;
        s+=a[i];
    }
    if (((n/2)+(n%2)-r)*y+((n/2)-l)+s>x) cout<<-1<<endl; else
        if ((n/2)-h-l<0) cout<<-1<<endl; else
     {
         for(i=1;i<=((n/2)+1-r);i++)
            cout<<y<<" ";
            if (r>=(n/2)+1)
            for(i=1;i<=n-r;i++)
            cout<<1<<" ";
                else
         for(i=1;i<=(n/2)-h-l;i++)
            cout<<1<<" ";
     }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,l=0,r=0,a;
int main()
{
    cin>>n>>k>>p>>x>>y;
    for(i=1;i<=k;i++)
    {
        cin>>a;
        if (a<y) l++; else r++;
        s+=a;
    }
    if ((n-((n+1)/2)+1-r)*y+(((n+1)/2-1)-l)+s>x) cout<<-1<<endl; else
     {
         if ((n+1)/2-1-l<0) cout<<-1<<endl; else
            if ((n-((n+1)/2)+1)-r<0)
            {
             for(i=1;i<=n-k;i++)
                 cout<<1<<" ";
            }
                else
         {
             for(i=1;i<=((n-((n+1)/2)+1)-r);i++)
                 cout<<y<<" ";
             for(i=1;i<=((n+1)/2-1)-l;i++)
                 cout<<1<<" ";
         }
     }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,l=0,r=0,a[1000000],h;
int main()
{
    cin>>n>>k>>p>>x>>y;
    if (n % 2==0) h=1; else h=0;
    for(i=1;i<=k;i++)
    {
        cin>>a[i];
        if (a[i]<y) l++; else r++;
        s+=a[i];
    }
    if (((n/2)+(n%2)-r)*y+((n/2)-l)+s>x) cout<<-1<<endl; else
        if (((n/2)+1-r<0) || ((n/2)-h-l<0)) cout<<-1<<endl; else
     {
         for(i=1;i<=((n/2)+1-r);i++)
            cout<<y<<" ";
         for(i=1;i<=(n/2)-h-l;i++)
            cout<<1<<" ";
     }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,l=0,r=0,a;
int main()
{
    cin>>n>>k>>p>>x>>y;
    for(i=1;i<=k;i++)
    {
        cin>>a;
        if (a<y) l++; else r++;
        s+=a;
    }
    if ((n-((n+1)/2)+1-r)*y+(((n+1)/2-1)-l)+s>x) cout<<-1<<endl; else
     {
         if ((n+1)/2-1-l<0) cout<<-1<<endl; else
            if ((n-((n+1)/2)+1)-r<0)
            {
             for(i=1;i<=n-r;i++)
                 cout<<1<<" ";
            }
                else
         {
             for(i=1;i<=((n-((n+1)/2)+1)-r);i++)
                 cout<<y<<" ";
             for(i=1;i<=((n+1)/2-1)-l;i++)
                 cout<<1<<" ";
         }
     }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,l=0,r=0,a[1000000];
int main()
{
    cin>>n>>k>>p>>x>>y;
    for(i=1;i<=k;i++)
    {
        cin>>a[i];
        if (a[i]<y) l++; else r++;
        s+=a[i];
    }
    if (((n/2)+(n%2)-r)*y+((n/2)-l)+s>x) cout<<-1<<endl; else
     {
         for(i=1;i<=((n/2)+(n%2)-r);i++)
            cout<<y<<" ";
         for(i=1;i<=(n/2)-l;i++)
            cout<<1<<" ";
     }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,l=0,r=0,a[1000000],h;
int main()
{
    cin>>n>>k>>p>>x>>y;
    if (n % 2==0) h=1; else h=0;
    for(i=1;i<=k;i++)
    {
        cin>>a[i];
        if (a[i]<y) l++; else r++;
        s+=a[i];
    }
    if (((n/2)+(n%2)-r)*y+((n/2)-l)+s>x) cout<<-1<<endl; else
        if ((n/2)-h-l<0) cout<<-1<<endl; else
     {
         for(i=1;i<=((n/2)+1-r);i++)
            cout<<y<<" ";
            if (r>(n/2)+1)
            for(i=1;i<=n-r;i++)
            cout<<1<<" ";
                else
         for(i=1;i<=(n/2)-h-l;i++)
            cout<<1<<" ";
     }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,a[1000000],c,h;
int main()
{
    cin>>n>>k>>p>>x>>y;
    for(i=1;i<=k;i++)
    {
        cin>>a[i];
        s+=a[i];
    }
    if (x<s) {cout<<"-1"<<endl;} else
        if (x-s<y) {cout<<"-1"<<endl;} else
        {
            c=(x-s)/(n-k);
            h=(x-s)%(n-k);
            for(i=1;i<=n-k;i++)
            {
                a[i]=c;
                if (i<h) {a[i]++;}
                cout<<a[i]<<" ";
            }
        }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,l=0,a[1000000],c,h;
int main()
{
    cin>>n>>k>>p>>x>>y;
    for(i=1;i<=k;i++)
    {
        cin>>a[i];
        if (a[i]>=y) l++;
        s+=a[i];
    }
    long long s1;
    if (x<=s) {cout<<"-1"<<endl;} else
        {
            s1=y*(((n+1)/2)-l);

            c=(x-s-s1)/(n-k-((n+1)/2)+l);
            h=(x-s-s1)%(n-k-((n+1)/2)+l);
            if (c>=1)
            {
            for(i=1;i<=((n+1)/2)-l;i++)
            {
                a[i]=y;
                cout<<a[i]<<" ";
            }
            for(i=1;i<=n-k-((n+1)/2)+l;i++)
            {
                a[i]=c;
                if (i<h) {a[i]++;}
                cout<<a[i]<<" ";
            }
            }
            else cout<<-1<<endl;
        }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#include <stack>
#include <bitset>

using namespace std;
long long s=0,n,k,p,x,y,i,l=0,r=0,a;
int main()
{
    cin>>n>>k>>p>>x>>y;
    for(i=1;i<=k;i++)
    {
        cin>>a;
        if (a<y) l++; else r++;
        s+=a;
    }
    if ((n-((n+1)/2)+1-r)*y+(((n+1)/2-1)-l)+s>x) cout<<-1<<endl; else
     {
         if ((n+1)/2-1-l<0) cout<<-1<<endl; else
            if ((n-((n+1)/2)+1)-r<0)
            {
                if (s+n-k>x) cout<<-1<<endl; else
             for(i=1;i<=n-k;i++)
                 cout<<1<<" ";
            }
                else
         {
             for(i=1;i<=((n-((n+1)/2)+1)-r);i++)
                 cout<<y<<" ";
             for(i=1;i<=((n+1)/2-1)-l;i++)
                 cout<<1<<" ";
         }
     }
    return 0;
}


// Coder: Piyush Kidambi

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

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;

#define pb push_back
#define mp make_pair
#define I vector<int>::iterator
#define ss(a) scanf("%s",a)
#define si(a) scanf("%d",&a)
#define sll(a) cin>>a
#define pi(a) printf("%d ",a)
#define pll(a) cout<<a
#define ps(a) printf("%s ",a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=n-1;i>=0;i--)
#define nl printf("\n")
#define all(a)  a.begin(),a.end()
#define ll long long int
#define MOD 1000000007
#define MAX 1000100
int main()
{
	int n,k,p,x,y,i,val,sum=0;
	si(n);si(k);si(p);si(x);si(y);
	vector<int> a,xx;
	For(i,k){
		si(val);
		a.pb(val);
	}
	sort(all(a));
	int l=n-k;
	For(i,l){
		int sz=a.size();
		if(a[(sz+1)/2]==y && a[((sz+1)/2)-1]==y){
			a.pb(1);
			xx.pb(1);
		}
		else if(a[(sz+1)/2]<=y){
			a.pb(a[(sz+1)/2]);
			xx.pb(a[(sz+1)/2]);
		}
		else{
			a.pb(1);
			xx.pb(1);
		}
		sort(all(a));
	}
	sort(all(xx));
	int sz=a.size();
	For(i,sz)sum+=a[i];
	if(sum<=x && a[(sz+1)/2]>=y){
		For(i,l)pi(xx[i]);
	}
	else printf("-1");
	nl;
	return 0;
}


// Coder: Piyush Kidambi

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

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;

#define pb push_back
#define mp make_pair
#define I vector<int>::iterator
#define ss(a) scanf("%s",a)
#define si(a) scanf("%d",&a)
#define sll(a) cin>>a
#define pi(a) printf("%d ",a)
#define pll(a) cout<<a
#define ps(a) printf("%s ",a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=n-1;i>=0;i--)
#define nl printf("\n")
#define all(a)  a.begin(),a.end()
#define ll long long int
#define MOD 1000000007
#define MAX 1000100
int main()
{
	int n,k,p,x,y,i,val,sum=0;
	si(n);si(k);si(p);si(x);si(y);
	vector<int> a,xx;
	For(i,k){
		si(val);
		a.pb(val);
	}
	sort(all(a));
	int l=n-k;
	For(i,l){
		int fl=0;
		int sz=a.size();
		if(((sz+1)/2)-1>=0){
			if(a[(sz+1)/2]==y && a[((sz+1)/2)-1]==y){
				a.pb(1);
				xx.pb(1);
				fl=1;
			}
		}
		if(fl==0){
			if(a[(sz+1)/2]<=y){
				a.pb(a[(sz+1)/2]);
				xx.pb(a[(sz+1)/2]);
			}
			else{
				a.pb(1);
				xx.pb(1);
			}
		}
		sort(all(a));
	}
	sort(all(xx));
	int sz=a.size();
	For(i,sz)sum+=a[i];
	if(sum<=x && a[(sz+1)/2]>=y){
		For(i,xx.size())pi(xx[i]);
	}
	else printf("-1");
	nl;
	return 0;
}


// Coder: Piyush Kidambi

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

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;

#define pb push_back
#define mp make_pair
#define I vector<int>::iterator
#define ss(a) scanf("%s",a)
#define si(a) scanf("%d",&a)
#define sll(a) cin>>a
#define pi(a) printf("%d ",a)
#define pll(a) cout<<a
#define ps(a) printf("%s ",a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=n-1;i>=0;i--)
#define nl printf("\n")
#define all(a)  a.begin(),a.end()
#define ll long long int
#define MOD 1000000007
#define MAX 1000100
int main()
{
	int n,k,p,x,y,i,val,sum=0;
	si(n);si(k);si(p);si(x);si(y);
	vector<int> a,xx;
	For(i,k){
		si(val);
		a.pb(val);
	}
	sort(all(a));
	int l=n-k;
	For(i,l){
		int fl=0;
		int sz=a.size()-1;
		if(((sz+1)/2)-1>=0){
			if(a[(sz+1)/2]==y && a[((sz+1)/2)-1]==y){
				a.pb(1);
				xx.pb(1);
				fl=1;
			}
		}
		if(fl==0){
			if(a[(sz+1)/2]<=y){
				a.pb(a[(sz+1)/2]);
				xx.pb(a[(sz+1)/2]);
			}
			else{
				a.pb(1);
				xx.pb(1);
			}
		}
		sort(all(a));
	}
	sort(all(xx));
	int sz=a.size();
	For(i,sz)sum+=a[i];
	if(sum<=x && a[(sz+1)/2]>=y){
		For(i,xx.size())pi(xx[i]);
	}
	else printf("-1");
	nl;
	return 0;
}


// Coder: Piyush Kidambi

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

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;

#define pb push_back
#define mp make_pair
#define I vector<int>::iterator
#define ss(a) scanf("%s",a)
#define si(a) scanf("%d",&a)
#define sll(a) cin>>a
#define pi(a) printf("%d ",a)
#define pll(a) cout<<a
#define ps(a) printf("%s ",a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=n-1;i>=0;i--)
#define nl printf("\n")
#define all(a)  a.begin(),a.end()
#define ll long long int
#define MOD 1000000007
#define MAX 1000100
int main()
{
	int n,k,p,x,y,i,val,sum=0;
	si(n);si(k);si(p);si(x);si(y);
	vector<int> a,xx;
	For(i,k){
		si(val);
		a.pb(val);
	}
	sort(all(a));
	int l=n-k;
	For(i,l){
		int sz=a.size();
		if(a[(sz+1)/2]<=y){
			a.pb(a[(sz+1)/2]+1);
			xx.pb(a[(sz+1)/2]+1);
		}
		else{
			a.pb(1);
			xx.pb(1);
		}
		sort(all(a));
	}
	sort(all(xx));
	int sz=a.size();
	For(i,sz)sum+=a[i];
	if(sum<=x && a[(sz+1)/2]>=y){
		For(i,l)pi(xx[i]);
	}
	else printf("-1");
	nl;
	return 0;
}


// Coder: Piyush Kidambi

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

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;

#define pb push_back
#define mp make_pair
#define I vector<int>::iterator
#define ss(a) scanf("%s",a)
#define si(a) scanf("%d",&a)
#define sll(a) cin>>a
#define pi(a) printf("%d ",a)
#define pll(a) cout<<a
#define ps(a) printf("%s ",a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=n-1;i>=0;i--)
#define nl printf("\n")
#define all(a)  a.begin(),a.end()
#define ll long long int
#define MOD 1000000007
#define MAX 1000100
int main()
{
	int n,k,p,x,y,i,val,sum=0;
	si(n);si(k);si(p);si(x);si(y);
	vector<int> a,xx;
	For(i,k){
		si(val);
		a.pb(val);
	}
	sort(all(a));
	int l=n-k;
	For(i,l){
		int sz=a.size();
		//if(a[(sz+1)/2]==y && a[((sz+1)/2)-1]==y){
		//	a.pb(1);
		//	xx.pb(1);
		//}
		if(a[(sz+1)/2]<=y){
			a.pb(a[(sz+1)/2]);
			xx.pb(a[(sz+1)/2]);
		}
		else{
			a.pb(1);
			xx.pb(1);
		}
		sort(all(a));
	}
	sort(all(xx));
	int sz=a.size();
	For(i,sz)sum+=a[i];
	if(sum<=x && a[(sz+1)/2]>=y){
		For(i,l)pi(xx[i]);
	}
	else printf("-1");
	nl;
	return 0;
}


// Coder: Piyush Kidambi

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

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;

#define pb push_back
#define mp make_pair
#define I vector<int>::iterator
#define ss(a) scanf("%s",a)
#define si(a) scanf("%d",&a)
#define sll(a) cin>>a
#define pi(a) printf("%d ",a)
#define pll(a) cout<<a
#define ps(a) printf("%s ",a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=n-1;i>=0;i--)
#define nl printf("\n")
#define all(a)  a.begin(),a.end()
#define ll long long int
#define MOD 1000000007
#define MAX 1000100
int main()
{
	int n,k,p,x,y,i,val,sum=0;
	si(n);si(k);si(p);si(x);si(y);
	vector<int> a,xx;
	For(i,k){
		si(val);
		a.pb(val);
	}
	if(k==0 && n==1){
		if(x>=y)printf("%d\n",y);
		else printf("-1\n");
		return 0;
	}
	sort(all(a));
	int l=n-k;
	For(i,l){
		int fl=0;
		int sz=a.size()-1;
		if(((sz+1)/2)-1>=0){
			if(a[(sz+1)/2]==y && a[((sz+1)/2)-1]==y){
				a.pb(1);
				xx.pb(1);
				fl=1;
			}
		}
		if(fl==0){
			if(a[(sz+1)/2]<=y){
				a.pb(a[(sz+1)/2]);
				xx.pb(a[(sz+1)/2]);
			}
			else{
				a.pb(1);
				xx.pb(1);
			}
		}
		sort(all(a));
	}
	sort(all(xx));
	int sz=a.size()-1;
	For(i,sz+1)sum+=a[i];
	if(sum<=x && a[(sz+1)/2]>=y){
		For(i,xx.size())printf("%d%c",xx[i],i+1==xx.size()?'\n':' ');
	}
	else printf("-1\n");
	return 0;
}


// Coder: Piyush Kidambi

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

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;

#define pb push_back
#define mp make_pair
#define I vector<int>::iterator
#define ss(a) scanf("%s",a)
#define si(a) scanf("%d",&a)
#define sll(a) cin>>a
#define pi(a) printf("%d ",a)
#define pll(a) cout<<a
#define ps(a) printf("%s ",a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=n-1;i>=0;i--)
#define nl printf("\n")
#define all(a)  a.begin(),a.end()
#define ll long long int
#define MOD 1000000007
#define MAX 1000100
int main()
{
	int n,k,p,x,y,i,val,sum=0;
	si(n);si(k);si(p);si(x);si(y);
	vector<int> a,xx;
	For(i,k){
		si(val);
		a.pb(val);
	}
	sort(all(a));
	int l=n-k;
	For(i,l){
		int fl=0;
		int sz=a.size();
		if(((sz+1)/2)-1>=0){
			if(a[(sz+1)/2]==y && a[((sz+1)/2)-1]==y){
				a.pb(1);
				xx.pb(1);
				fl=1;
			}
		}
		if(fl==0){
			if(a[(sz+1)/2]<=y){
				a.pb(a[(sz+1)/2]);
				xx.pb(a[(sz+1)/2]);
			}
			else{
				a.pb(1);
				xx.pb(1);
			}
		}
		sort(all(a));
	}
	sort(all(xx));
	int sz=a.size();
	For(i,sz)sum+=a[i];
	if(sum<=x && a[(sz+1)/2]>=y){
		For(i,l)pi(xx[i]);
	}
	else printf("-1");
	nl;
	return 0;
}


// Coder: Piyush Kidambi

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

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;

#define pb push_back
#define mp make_pair
#define I vector<int>::iterator
#define ss(a) scanf("%s",a)
#define si(a) scanf("%d",&a)
#define sll(a) cin>>a
#define pi(a) printf("%d ",a)
#define pll(a) cout<<a
#define ps(a) printf("%s ",a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=n-1;i>=0;i--)
#define nl printf("\n")
#define all(a)  a.begin(),a.end()
#define ll long long int
#define MOD 1000000007
#define MAX 1000100
int main()
{
	int n,k,p,x,y,i,val,sum=0;
	si(n);si(k);si(p);si(x);si(y);
	vector<int> a,xx;
	For(i,k){
		si(val);
		a.pb(val);
	}
	sort(all(a));
	int l=n-k;
	For(i,l){
		int fl=0;
		int sz=a.size()-1;
		if(((sz+1)/2)-1>=0){
			if(a[(sz+1)/2]==y && a[((sz+1)/2)-1]==y){
				a.pb(1);
				xx.pb(1);
				fl=1;
			}
		}
		if(fl==0){
			if(a[(sz+1)/2]<=y){
				a.pb(a[(sz+1)/2]);
				xx.pb(a[(sz+1)/2]);
			}
			else{
				a.pb(1);
				xx.pb(1);
			}
		}
		sort(all(a));
	}
	sort(all(xx));
	int sz=a.size()-1;
	For(i,sz+1)sum+=a[i];
	if(sum<=x && a[(sz+1)/2]>=y){
		For(i,xx.size())printf("%d%c",xx[i],i+1==xx.size()?'\n':' ');
	}
	else printf("-1\n");
	return 0;
}


// Coder: Piyush Kidambi

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

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;

#define pb push_back
#define mp make_pair
#define I vector<int>::iterator
#define ss(a) scanf("%s",a)
#define si(a) scanf("%d",&a)
#define sll(a) cin>>a
#define pi(a) printf("%d ",a)
#define pll(a) cout<<a
#define ps(a) printf("%s ",a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=n-1;i>=0;i--)
#define nl printf("\n")
#define all(a)  a.begin(),a.end()
#define ll long long int
#define MOD 1000000007
#define MAX 1000100
int main()
{
	int n,k,p,x,y,i,val,sum=0;
	si(n);si(k);si(p);si(x);si(y);
	vector<int> a,xx;
	For(i,k){
		si(val);
		a.pb(val);
	}
	sort(all(a));
	int l=n-k;
	For(i,l){
		int fl=0;
		int sz=a.size()-1;
		if(((sz+1)/2)-1>=0){
			if(a[(sz+1)/2]==y && a[((sz+1)/2)-1]==y){
				a.pb(1);
				xx.pb(1);
				fl=1;
			}
		}
		if(fl==0){
			if(a[(sz+1)/2]<=y){
				a.pb(a[(sz+1)/2]);
				xx.pb(a[(sz+1)/2]);
			}
			else{
				a.pb(1);
				xx.pb(1);
			}
		}
		sort(all(a));
	}
	sort(all(xx));
	int sz=a.size()-1;
	For(i,sz+1)sum+=a[i];
	if(sum<=x && a[(sz+1)/2]>=y){
		For(i,xx.size())pi(xx[i]);
	}
	else printf("-1");
	nl;
	return 0;
}


// Coder: Piyush Kidambi

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

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;

#define pb push_back
#define mp make_pair
#define I vector<int>::iterator
#define ss(a) scanf("%s",a)
#define si(a) scanf("%d",&a)
#define sll(a) cin>>a
#define pi(a) printf("%d ",a)
#define pll(a) cout<<a
#define ps(a) printf("%s ",a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=n-1;i>=0;i--)
#define nl printf("\n")
#define all(a)  a.begin(),a.end()
#define ll long long int
#define MOD 1000000007
#define MAX 1000100
int x[]={-1,-1,-1,0,0,1,1,1};
int y[]={-1,0,1,-1,1,-1,0,1};

#define N 2010
int a[N];
int main()
{
	/*#ifndef ONLINE_JUDGE
	  freopen("in.in", "r", stdin);
	  freopen("out.out", "w", stdout);
#endif
*/

	int n,k,p,x,y,i;
	si(n);si(k);si(p);si(x);si(y);
	For(i,k) si(a[i]);
	int c=0;
	For(i,k) c+=(a[i]>=y);
	int m=k;
	while ( c<(n+1)/2 ) a[m++]=y,c++;
	while ( m<n ) a[m++]=1;
	if ( m>n ) puts("-1");
	else {
		int s=0;
		For(i,n) s+=a[i];
		if ( s>x ) puts("-1");
		else {
			for (i=k; i<n; i++ ) printf("%d%c",a[i],i+1==n?'\n':' ');
		}
	}

	return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <deque>

using namespace std;

int main() {
	int n, k, p, x, y;
	cin >> n >> k >> p >> x >> y;
	vector <long long int> arr;
	for(int i = 0; i < k; ++i) {
		long long int marks;
		cin >> marks;
		arr.push_back(marks);
	}
	vector <long long int> ret;
	bool flag = false;
	for(int i = 0; i < k; ++i)
		ret.push_back(arr[i]);
	vector <long long int> a;
	for(int i = 0; i < ret.size(); ++i)
		if(ret[i] == y) {
			flag = true;
			break;
		}
	long long sum = 0LL;
	sort(ret.begin(), ret.end());
	if(ret.size() == 0)	ret.push_back(y), a.push_back(y);
	while(1) {
		sum = 0LL;
		for(int i = 0; i < ret.size(); ++i) {
			sum += ret[i];
		}
		if(sum > (long long)x) {
			cout << -1 << '\n';
			return 0;
		}
		if((int)ret.size() == n) break;
		if(ret[(int)ret.size() / 2] == y) {
			int sz = ret.size();
			int med = sz / 2;
			if(sz % 2 == 0) {
				if((med - 1 >= 0 && ret[med - 1] == y) || sum + y > x) {
				ret.push_back(1);
				a.push_back(1);
				} else {
					ret.push_back(y);
					a.push_back(y);
				}
			} else {
				if((med - 1 >= 0 && ret[med - 1] == y) || sum + y > x) {
					ret.push_back(1);
					a.push_back(1);
				} else {
					ret.push_back(y);
					a.push_back(y);
				}
			}
			sort(ret.begin(), ret.end());
		} else if(ret[(int)ret.size() / 2] < y){
			a.push_back(y);
			ret.push_back(y);
			sort(ret.begin(), ret.end());
		} else {
			ret.push_back(1);
			a.push_back(1);
			sort(ret.begin(), ret.end());
		}
	}
	if(ret[ret.size() / 2] < y) {
		cout << -1 << '\n';
		return 0;
	}
	sum = 0LL;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > (long long)x) {
		cout << -1 << '\n';
		return 0;
	}
	for(int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
	cout << '\n';
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <deque>

using namespace std;

int main() {
	int n, k, p, x, y;
	cin >> n >> k >> p >> x >> y;
	int arr[k + 1];
	for(int i = 0; i < k; ++i) cin >> arr[i];
	sort(arr, arr + k);
	vector <int> ret;
	bool flag = false;
	if(binary_search(arr, arr + k, y) != -1) {
		flag = true;
		for(int i = 0; i < k; ++i) {
			if(arr[i] == y) {
				ret.push_back(y);
				arr[i] = -1;
			}
		}
	}
	for(int i = 0; i < k; ++i) {
		if(arr[i] != -1) ret.push_back(arr[i]);
	}
	vector <int> a;
	if(flag == false) {
		ret.push_back(y);
		a.push_back(y);
	}
	sort(ret.begin(), ret.end());
	while(1) {
		int sum = 0;
		/*cout << "ARRAY:\n";
		for(int i = 0; i < ret.size(); ++i) cout << ret[i] << ' ';
		cout << '\n';*/
		for(int i = 0; i < ret.size(); ++i) {
			sum += ret[i];
		}
		if(sum > x) {
			cout << -1 << '\n';
			return 0;
		}
		if(ret.size() == n) break;
		if(ret[ret.size() / 2] == y) {
			int sz = ret.size();
			if(sz & 1) ret.push_back(1), a.push_back(1);
			else {
			 	int med = sz / 2;
				if(med - 1 >= 0 && ret[med - 1] == y) ret.push_back(1), a.push_back(1);
				else ret.push_back(y), a.push_back(y);
			}
			sort(ret.begin(), ret.end());
		} else if(ret[ret.size() / 2] < y){
			ret.push_back(y);
			a.push_back(y);
			sort(ret.begin(), ret.end());
		} else {
			ret.push_back(1);
			a.push_back(1);
			sort(ret.begin(), ret.end());
		}
	}
	if(ret[ret.size() / 2] != y) {
		cout << -1 << '\n';
		return 0;
	}
	/*for(int i = 0; i < ret.size(); ++i) cout << ret[i] << ' ';
	cout << '\n';*/
	for(int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
	cout << '\n';
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <deque>

using namespace std;

int main() {
	int n, k, p, x, y;
	cin >> n >> k >> p >> x >> y;
	vector <int> arr;
	for(int i = 0; i < k; ++i) {
		int marks;
		cin >> marks;
		arr.push_back(marks);
	}
	sort(arr.begin(), arr.end());
	vector <int> ret;
	bool flag = false;

	if(binary_search(arr.begin(), arr.end(), y)) {
		for(int i = 0; i < k; ++i) {
			if(arr[i] == y) {
				ret.push_back(y);
				flag = true;
				arr[i] = -1;
			}
		}
	}
	for(int i = 0; i < k; ++i) {
		if(arr[i] != -1) ret.push_back(arr[i]);
	}
	vector <int> a;
	if(flag == false) {
		if(ret.size() < n) {
			ret.push_back(y);
			a.push_back(y);
		}
	}
	//cout << "HERE:\n";
	sort(ret.begin(), ret.end());
	while(1) {
		int sum = 0;
		/*cout << "ARRAY: " << ret.size() << '\n';;
		for(int i = 0; i < ret.size(); ++i) cout << ret[i] << ' ';
		cout << '\n';*/
		for(int i = 0; i < ret.size(); ++i) {
			sum += ret[i];
		}
		if(sum > x) {
			cout << -1 << '\n';
			return 0;
		}
		if(ret.size() == n) break;
		if(ret[ret.size() / 2] == y) {
			int sz = ret.size();
			if(sz & 1) ret.push_back(1), a.push_back(1);
			else {
			 	int med = sz / 2;
				if(med - 1 >= 0 && ret[med - 1] == y) ret.push_back(1), a.push_back(1);
				else ret.push_back(y), a.push_back(y);
			}
			sort(ret.begin(), ret.end());
		} else if(ret[ret.size() / 2] < y){
			ret.push_back(y);
			a.push_back(y);
			sort(ret.begin(), ret.end());
		} else {
			ret.push_back(1);
			a.push_back(1);
			sort(ret.begin(), ret.end());
		}
	}
	if(ret[ret.size() / 2] != y) {
		cout << -1 << '\n';
		return 0;
	}
	/*for(int i = 0; i < ret.size(); ++i) cout << ret[i] << ' ';
	cout << '\n';*/
	for(int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
	cout << '\n';
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <deque>

using namespace std;

int main() {
	int n, k, p, x, y;
	cin >> n >> k >> p >> x >> y;
	vector <long long int> arr;
	for(int i = 0; i < k; ++i) {
		long long int marks;
		cin >> marks;
		arr.push_back(marks);
	}
	sort(arr.begin(), arr.end());
	vector <long long int> ret;
	bool flag = false;
	for(int i = 0; i < k; ++i)
		ret.push_back(arr[i]);
	vector <long long int> a;
	for(int i = 0; i < ret.size(); ++i)
		if(ret[i] == y) {
			flag = true;
			break;
		}
	if(flag == false) {
		if(ret.size() < n) {
			ret.push_back(y);
			a.push_back(y);
		}
	}
	//cout << "HERE:\n";
	sort(ret.begin(), ret.end());
	while(1) {
		long long int sum = 0;
		/*cout << "ARRAY: " << ret.size() << '\n';;
		for(int i = 0; i < ret.size(); ++i) cout << ret[i] << ' ';
		cout << '\n';*/
		for(int i = 0; i < ret.size(); ++i) {
			sum += ret[i];
		}
		if(sum > x) {
			cout << -1 << '\n';
			return 0;
		}
		if(ret.size() == n) break;
		if(ret[ret.size() / 2] == y) {
			int sz = ret.size();
			sum = 0;
			for(int i = 0; i < ret.size(); ++i) sum += ret[i];
			if(sum + y > x) {
				ret.push_back(1);
				a.push_back(1);
			} else {
				ret.push_back(y);
				a.push_back(y);
			}
			/*if(sz & 1) ret.push_back(1), a.push_back(1);
			else {
			 	int med = sz / 2;
				if((med - 1 >= 0 && ret[med - 1] == y) || sum + y > x) ret.push_back(1), a.push_back(1);
				else ret.push_back(y), a.push_back(y);
			}*/
			sort(ret.begin(), ret.end());
		} else if(ret[ret.size() / 2] < y){
			ret.push_back(y);
			a.push_back(y);
			sort(ret.begin(), ret.end());
		} else {
			ret.push_back(1);
			a.push_back(1);
			sort(ret.begin(), ret.end());
		}
	}
	if(ret[ret.size() / 2] != y) {
		cout << -1 << '\n';
		return 0;
	}
	long long sum = 0;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > x) {
		cout << -1 << '\n';
		return 0;
	}
	for(int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
	cout << '\n';
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <deque>

using namespace std;

int main() {
	int n, k, p, x, y;
	cin >> n >> k >> p >> x >> y;
	vector <long long int> arr;
	for(int i = 0; i < k; ++i) {
		long long int marks;
		cin >> marks;
		arr.push_back(marks);
	}
	vector <long long int> ret;
	bool flag = false;
	for(int i = 0; i < k; ++i)
		ret.push_back(arr[i]);
	vector <long long int> a;
	for(int i = 0; i < ret.size(); ++i)
		if(ret[i] == y) {
			flag = true;
			break;
		}
	long long sum = 0LL;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > (long long)x) {
		cout << -1 << '\n';
		return 0;
	}
	if(flag == false) {
		if(ret.size() < n) {
			ret.push_back(y);
			a.push_back(y);
		}
	}
	sum = 0LL;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > (long long)x) {
		cout << -1 << '\n';
		return 0;
	}
	sort(ret.begin(), ret.end());
	while(1) {
		sum = 0LL;
		for(int i = 0; i < ret.size(); ++i) {
			sum += ret[i];
		}
		if(sum > (long long)x) {
			cout << -1 << '\n';
			return 0;
		}
		if((int)ret.size() == n) break;
		if(ret[(int)ret.size() / 2] == y) {
			int sz = ret.size();
			sum = 0;
			for(int i = 0; i < ret.size(); ++i) sum += ret[i];
			if(sum + y > x) {
				ret.push_back(1);
				a.push_back(1);
			} else {
				ret.push_back(y);
				a.push_back(y);
			}
			sort(ret.begin(), ret.end());
		} else if(ret[(int)ret.size() / 2] < y){
			ret.push_back(y);
			a.push_back(y);
			sort(ret.begin(), ret.end());
		} else {
			ret.push_back(1);
			a.push_back(1);
			sort(ret.begin(), ret.end());
		}
	}
	if(ret[ret.size() / 2] != y) {
		cout << -1 << '\n';
		return 0;
	}
	sum = 0LL;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > (long long)x) {
		cout << -1 << '\n';
		return 0;
	}
	for(int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
	cout << '\n';
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <deque>

using namespace std;

int main() {
	int n, k, p, x, y;
	cin >> n >> k >> p >> x >> y;
	vector <long long int> arr;
	for(int i = 0; i < k; ++i) {
		long long int marks;
		cin >> marks;
		arr.push_back(marks);
	}
	sort(arr.begin(), arr.end());
	vector <long long int> ret;
	bool flag = false;
	for(int i = 0; i < k; ++i)
		ret.push_back(arr[i]);
	vector <long long int> a;
	for(int i = 0; i < ret.size(); ++i)
		if(ret[i] == y) {
			flag = true;
			break;
		}
	if(flag == false) {
		if(ret.size() < n) {
			ret.push_back(y);
			a.push_back(y);
		}
	}
	//cout << "HERE:\n";
	sort(ret.begin(), ret.end());
	while(1) {
		long long int sum = 0;
		/*cout << "ARRAY: " << ret.size() << '\n';;
		for(int i = 0; i < ret.size(); ++i) cout << ret[i] << ' ';
		cout << '\n';*/
		for(int i = 0; i < ret.size(); ++i) {
			sum += ret[i];
		}
		if(sum > x) {
			cout << -1 << '\n';
			return 0;
		}
		if(ret.size() == n) break;
		if(ret[ret.size() / 2] == y) {
			int sz = ret.size();
			if(sz & 1) ret.push_back(1), a.push_back(1);
			else {
			 	int med = sz / 2;
			 	long long sum = 0;
			 	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
				if((med - 1 >= 0 && ret[med - 1] == y) || sum + y > x) ret.push_back(1), a.push_back(1);
				else ret.push_back(y), a.push_back(y);
			}
			sort(ret.begin(), ret.end());
		} else if(ret[ret.size() / 2] < y){
			ret.push_back(y);
			a.push_back(y);
			sort(ret.begin(), ret.end());
		} else {
			ret.push_back(1);
			a.push_back(1);
			sort(ret.begin(), ret.end());
		}
	}
	if(ret[ret.size() / 2] != y) {
		cout << -1 << '\n';
		return 0;
	}
	long long sum = 0;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > x) {
		cout << -1 << '\n';
		return 0;
	}
	for(int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
	cout << '\n';
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <deque>

using namespace std;

int main() {
	int n, k, p, x, y;
	cin >> n >> k >> p >> x >> y;
	vector <long long int> arr;
	for(int i = 0; i < k; ++i) {
		long long int marks;
		cin >> marks;
		arr.push_back(marks);
	}
	sort(arr.begin(), arr.end());
	vector <long long int> ret;
	bool flag = false;
	for(int i = 0; i < k; ++i)
		ret.push_back(arr[i]);
	vector <long long int> a;
	for(int i = 0; i < ret.size(); ++i)
		if(ret[i] == y) {
			flag = true;
			break;
		}
	long long sum = 0LL;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > (long long)x) {
		cout << -1 << '\n';
		return 0;
	}
	if(flag == false) {
		if(ret.size() < n) {
			ret.push_back(y);
			a.push_back(y);
		}
	}
	sum = 0LL;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > (long long)x) {
		cout << -1 << '\n';
		return 0;
	}
	//cout << "HERE:\n";
	sort(ret.begin(), ret.end());
	while(1) {
		sum = 0LL;
		/*cout << "ARRAY: " << ret.size() << '\n';;
		for(int i = 0; i < ret.size(); ++i) cout << ret[i] << ' ';
		cout << '\n';*/
		for(int i = 0; i < ret.size(); ++i) {
			sum += ret[i];
		}
		if(sum > (long long)x) {
			cout << -1 << '\n';
			return 0;
		}
		if((int)ret.size() == n) break;
		if(ret[(int)ret.size() / 2] == y) {
			int sz = ret.size();
			sum = 0;
			for(int i = 0; i < ret.size(); ++i) sum += ret[i];
			if(sum + y > x) {
				ret.push_back(1);
				a.push_back(1);
			} else {
				ret.push_back(y);
				a.push_back(y);
			}
			/*if(sz & 1) ret.push_back(1), a.push_back(1);
			else {
			 	int med = sz / 2;
				if((med - 1 >= 0 && ret[med - 1] == y) || sum + y > x) ret.push_back(1), a.push_back(1);
				else ret.push_back(y), a.push_back(y);
			}*/
			sort(ret.begin(), ret.end());
		} else if(ret[(int)ret.size() / 2] < y){
			ret.push_back(y);
			a.push_back(y);
			sort(ret.begin(), ret.end());
		} else {
			ret.push_back(1);
			a.push_back(1);
			sort(ret.begin(), ret.end());
		}
	}
	if(ret[ret.size() / 2] != y) {
		cout << -1 << '\n';
		return 0;
	}
	sum = 0LL;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > (long long)x) {
		cout << -1 << '\n';
		return 0;
	}
	for(int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
	cout << '\n';
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <deque>

using namespace std;

int main() {
	int n, k, p, x, y;
	cin >> n >> k >> p >> x >> y;
	vector <long long int> arr;
	for(int i = 0; i < k; ++i) {
		long long int marks;
		cin >> marks;
		arr.push_back(marks);
	}
	sort(arr.begin(), arr.end());
	vector <long long int> ret;
	bool flag = false;
	for(int i = 0; i < k; ++i)
		ret.push_back(arr[i]);
	vector <long long int> a;
	for(int i = 0; i < ret.size(); ++i)
		if(ret[i] == y) {
			flag = true;
			break;
		}
	if(flag == false) {
		if(ret.size() < n) {
			ret.push_back(y);
			a.push_back(y);
		}
	}
	//cout << "HERE:\n";
	sort(ret.begin(), ret.end());
	while(1) {
		long long int sum = 0;
		/*cout << "ARRAY: " << ret.size() << '\n';;
		for(int i = 0; i < ret.size(); ++i) cout << ret[i] << ' ';
		cout << '\n';*/
		for(int i = 0; i < ret.size(); ++i) {
			sum += ret[i];
		}
		if(sum > x) {
			cout << -1 << '\n';
			return 0;
		}
		if(ret.size() == n) break;
		if(ret[ret.size() / 2] == y) {
			int sz = ret.size();
			if(sz & 1) ret.push_back(1), a.push_back(1);
			else {
			 	int med = sz / 2;
				if(med - 1 >= 0 && ret[med - 1] == y) ret.push_back(1), a.push_back(1);
				else ret.push_back(y), a.push_back(y);
			}
			sort(ret.begin(), ret.end());
		} else if(ret[ret.size() / 2] < y){
			ret.push_back(y);
			a.push_back(y);
			sort(ret.begin(), ret.end());
		} else {
			ret.push_back(1);
			a.push_back(1);
			sort(ret.begin(), ret.end());
		}
	}
	if(ret[ret.size() / 2] != y) {
		cout << -1 << '\n';
		return 0;
	}
	long long sum = 0;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > x) {
		cout << -1 << '\n';
		return 0;
	}
	for(int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
	cout << '\n';
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <deque>

using namespace std;

int main() {
	int n, k, p, x, y;
	cin >> n >> k >> p >> x >> y;
	int arr[k + 1];
	for(int i = 0; i < k; ++i) cin >> arr[i];
	sort(arr, arr + k);
	vector <int> ret;
	bool flag = false;
	if(binary_search(arr, arr + k, y) != -1) {
		flag = true;
		for(int i = 0; i < k; ++i) {
			if(arr[i] == y) {
				ret.push_back(y);
				arr[i] = -1;
			}
		}
	}
	for(int i = 0; i < k; ++i) {
		if(arr[i] != -1) ret.push_back(arr[i]);
	}
	vector <int> a;
	if(flag == false) {
		if(ret.size() < n) ret.push_back(y);
		if(ret.size() < n) a.push_back(y);
	}
	sort(ret.begin(), ret.end());
	while(1) {
		int sum = 0;
		/*cout << "ARRAY:\n";
		for(int i = 0; i < ret.size(); ++i) cout << ret[i] << ' ';
		cout << '\n';*/
		for(int i = 0; i < ret.size(); ++i) {
			sum += ret[i];
		}
		if(sum > x) {
			cout << -1 << '\n';
			return 0;
		}
		if(ret.size() == n) break;
		if(ret[ret.size() / 2] == y) {
			int sz = ret.size();
			if(sz & 1) ret.push_back(1), a.push_back(1);
			else {
			 	int med = sz / 2;
				if(med - 1 >= 0 && ret[med - 1] == y) ret.push_back(1), a.push_back(1);
				else ret.push_back(y), a.push_back(y);
			}
			sort(ret.begin(), ret.end());
		} else if(ret[ret.size() / 2] < y){
			ret.push_back(y);
			a.push_back(y);
			sort(ret.begin(), ret.end());
		} else {
			ret.push_back(1);
			a.push_back(1);
			sort(ret.begin(), ret.end());
		}
	}
	if(ret[ret.size() / 2] != y) {
		cout << -1 << '\n';
		return 0;
	}
	/*for(int i = 0; i < ret.size(); ++i) cout << ret[i] << ' ';
	cout << '\n';*/
	for(int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
	cout << '\n';
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <deque>

using namespace std;

int main() {
	int n, k, p, x, y;
	cin >> n >> k >> p >> x >> y;
	vector <long long int> arr;
	for(int i = 0; i < k; ++i) {
		long long int marks;
		cin >> marks;
		arr.push_back(marks);
	}
	vector <long long int> ret;
	bool flag = false;
	for(int i = 0; i < k; ++i)
		ret.push_back(arr[i]);
	vector <long long int> a;
	for(int i = 0; i < ret.size(); ++i)
		if(ret[i] == y) {
			flag = true;
			break;
		}
	long long sum = 0LL;
	sort(ret.begin(), ret.end());
	if(ret.size() == 0)	ret.push_back(y);
	while(1) {
		sum = 0LL;
		for(int i = 0; i < ret.size(); ++i) {
			sum += ret[i];
		}
		if(sum > (long long)x) {
			cout << -1 << '\n';
			return 0;
		}
		if((int)ret.size() == n) break;
		if(ret[(int)ret.size() / 2] == y) {
			int sz = ret.size();
			int med = sz / 2;
			if(sz % 2 == 0) {
				if((med - 1 >= 0 && ret[med - 1] == y) || sum + y > x) {
				ret.push_back(1);
				a.push_back(1);
				} else {
					ret.push_back(y);
					a.push_back(y);
				}
			} else {
				if((med - 1 >= 0 && ret[med - 1] == y) || sum + y > x) {
					ret.push_back(1);
					a.push_back(1);
				} else {
					ret.push_back(y);
					a.push_back(y);
				}
			}
			sort(ret.begin(), ret.end());
		} else if(ret[(int)ret.size() / 2] < y){
			a.push_back(y);
			ret.push_back(y);
			sort(ret.begin(), ret.end());
		} else {
			ret.push_back(1);
			a.push_back(1);
			sort(ret.begin(), ret.end());
		}
	}
	if(ret[ret.size() / 2] < y) {
		cout << -1 << '\n';
		return 0;
	}
	sum = 0LL;
	for(int i = 0; i < ret.size(); ++i) sum += ret[i];
	if(sum > (long long)x) {
		cout << -1 << '\n';
		return 0;
	}
	for(int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
	cout << '\n';
}


#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a[100001],b[100001];
int main()
{
     int n,k,p,x,y;
     scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
     int i;
     int sum=0;
     for(i=1;i<=k;i++)
     {
          scanf("%d",&a[i]);
          sum+=a[i];
     }
     sort(a+1,a+1+k);
     int xt=a[(k+1)/2],xi=(k+1)/2;
     int s=k;
     if(xt<y)
     {
          while(xt<y&&xi<=k)
          {
          	   xi++;
               xt=a[xi];
               s++;
               b[s]=y;
               sum+=y;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2&&xt==y)
          {
          	   s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     else
     {
          while(xt>y&&xi>0)
          {
          	   s++;
          	   b[s]=1;
               xi--;
               xt=a[xi];
               sum+=1;
          }
          if(xi==0)
               xt=a[1];
          if(xt<y)
          {
               xi++;
               xt=a[xi];
               sum-=1;
               s--;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2)
          {
               s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     return 0;
}


#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a[100001],b[100001];
int main()
{
     int n,k,p,x,y;
     scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
     int i;
     int sum=0;
     for(i=1;i<=k;i++)
     {
          scanf("%d",&a[i]);
          sum+=a[i];
     }
     sort(a+1,a+1+k);
     int xt=a[(k+1)/2],xi=(k+1)/2;
     int s=k;
     if(xt<y)
     {
          while(xt<y&&xi<=k)
          {
          	   if(s%2==0)
			        xi++;
               xt=a[xi];
               s++;
               b[s]=y;
               sum+=y;
          }
          if(xt<y&&xi==k+1&&n-k<k||s>n)
          {
               printf("-1\n");
               return 0;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2&&xt==y)
          {
          	   s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     else
     {
          while(xt>y&&xi>0)
          {
          	   s++;
          	   b[s]=1;
		       xi--;
               xt=a[xi];
               sum+=1;
          }
          if(xi==0)
               xt=a[1];
          if(xt<y)
          {
               xi++;
               xt=a[xi];
               sum-=1;
               s--;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2)
          {
               s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     return 0;
}


#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a[100001],b[100001];
int main()
{
     int n,k,p,x,y;
     scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
     int i;
     int sum=0;
     for(i=1;i<=k;i++)
     {
          scanf("%d",&a[i]);
          sum+=a[i];
     }
     sort(a+1,a+1+k);
     int xt=a[k/2],xi=k/2;
     int s=k;
     if(xt<y)
     {
          while(xt<y)
          {
          	   xi++;
               xt=a[xi];
               s++;
               b[s]=y;
               sum+=y;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2&&xt==y)
          {
          	   s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     else
     {
          while(xt>y)
          {
          	   s++;
          	   b[s]=1;
               xi--;
               xt=a[xi];
               sum+=1;
          }
          if(xt<y)
          {
               xi++;
               xt=a[xi];
               sum-=1;
               s--;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2)
          {
               s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     return 0;
}


#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a[100001],b[100001];
int main()
{
     int n,k,p,x,y;
     scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
     int i;
     int sum=0;
     for(i=1;i<=k;i++)
     {
          scanf("%d",&a[i]);
          sum+=a[i];
     }
     sort(a+1,a+1+k);
     int xt=a[k/2],xi=k/2;
     int s=k;
     if(xt<y)
     {
          while(xt<y&&xi<=k)
          {
          	   xi++;
               xt=a[xi];
               s++;
               b[s]=y;
               sum+=y;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2&&xt==y)
          {
          	   s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     else
     {
          while(xt>y&&xi>0)
          {
          	   s++;
          	   b[s]=1;
               xi--;
               xt=a[xi];
               sum+=1;
          }
          if(xi==0)
               xt=a[1];
          if(xt<y)
          {
               xi++;
               xt=a[xi];
               sum-=1;
               s--;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2)
          {
               s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     return 0;
}


#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a[100001],b[100001];
int main()
{
     int n,k,p,x,y;
     scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
     int i;
     int sum=0;
     for(i=1;i<=k;i++)
     {
          scanf("%d",&a[i]);
          sum+=a[i];
     }
     sort(a+1,a+1+k);
     int xt=a[(k+1)/2],xi=(k+1)/2;
     int s=k;
     if(xt<y)
     {
          while(xt<y&&xi<=k)
          {
          	   if(s%2==0)
			        xi++;
               xt=a[xi];
               s++;
               b[s]=y;
               sum+=y;
          }
          if(xt<y&&xi==k+1&&n-k<k||s>n)
          {
               printf("-1\n");
               return 0;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2&&xt==y)
          {
          	   s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     else
     {
          while(xt>y&&xi>0&&s<n)
          {
          	   s++;
          	   b[s]=1;
          //	   if(s%2==1)
		            xi--;
               xt=a[xi];
               sum+=1;
          }
          if(xi==0)
               xt=a[1];
          if(xt<y)
          {
               xi++;
               xt=a[xi];
               sum-=1;
               s--;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2)
          {
               s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x||s>n)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     return 0;
}


#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a[100001],b[100001];
int main()
{
     int n,k,p,x,y;
     scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
     int i;
     int sum=0;
     for(i=1;i<=k;i++)
     {
          scanf("%d",&a[i]);
          sum+=a[i];
     }
     sort(a+1,a+1+k);
     int xt=a[(k+1)/2],xi=(k+1)/2;
     int s=k;
     if(xt<y)
     {
          while(xt<y&&xi<=k)
          {
          	   if(s%2==0)
			        xi++;
               xt=a[xi];
               s++;
               b[s]=y;
               sum+=y;
          }
          if(xt<y&&xi==k+1&&n-k<k||s>n)
          {
               printf("-1\n");
               return 0;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2&&xt==y)
          {
          	   s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     else
     {
          while(xt>y&&xi>0)
          {
          	   s++;
          	   b[s]=1;
          //	   if(s%2==1)
		            xi--;
               xt=a[xi];
               sum+=1;
          }
          if(xi==0)
               xt=a[1];
          if(xt<y)
          {
               xi++;
               xt=a[xi];
               sum-=1;
               s--;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2)
          {
               s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x||s>n)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     return 0;
}


#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a[100001],b[100001];
int main()
{
     int n,k,p,x,y;
     scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
     int i;
     int sum=0;
     for(i=1;i<=k;i++)
     {
          scanf("%d",&a[i]);
          sum+=a[i];
     }
     sort(a+1,a+1+k);
     int xt=a[(k+1)/2],xi=(k+1)/2;
     int s=k;
     if(xt<y)
     {
          while(xt<y&&xi<=k)
          {
			   xi++;
               xt=a[xi];
               s++;
               b[s]=y;
               sum+=y;
          }
          if(xt<y&&xi==k+1&&n-k<k)
          {
               printf("-1\n");
               return 0;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2&&xt==y)
          {
          	   s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     else
     {
          while(xt>y&&xi>0)
          {
          	   s++;
          	   b[s]=1;
		       xi--;
               xt=a[xi];
               sum+=1;
          }
          if(xi==0)
               xt=a[1];
          if(xt<y)
          {
               xi++;
               xt=a[xi];
               sum-=1;
               s--;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2)
          {
               s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     return 0;
}


#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a[100001],b[100001];
int main()
{
     int n,k,p,x,y;
     scanf("%d%d%d%d%d",&n,&k,&p,&x,&y);
     int i;
     int sum=0;
     for(i=1;i<=k;i++)
     {
          scanf("%d",&a[i]);
          sum+=a[i];
     }
     sort(a+1,a+1+k);
     int xt=a[(k+1)/2],xi=(k+1)/2;
     int s=k;
     if(xt<y)
     {
          while(xt<y&&xi<=k)
          {
          	   if(s%2==0)
			        xi++;
               xt=a[xi];
               s++;
               b[s]=y;
               sum+=y;
          }
          if(xt<y&&xi==k+1&&n-k<k)
          {
               printf("-1\n");
               return 0;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2&&xt==y)
          {
          	   s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     else
     {
          while(xt>y&&xi>0)
          {
          	   s++;
          	   b[s]=1;
		       xi--;
               xt=a[xi];
               sum+=1;
          }
          if(xi==0)
               xt=a[1];
          if(xt<y)
          {
               xi++;
               xt=a[xi];
               sum-=1;
               s--;
          }
          int xtt=n-s;
          for(i=1;i<=xtt;i+=2)
          {
               s++;
               b[s]=y;
               sum+=y;
               s++;
               b[s]=1;
               sum+=1;
          }
          if(i==xtt+2)
          {
               s--;
               b[s]=1;
               sum-=y;
          }
          if(sum>x)
               printf("-1\n");
          else
               for(i=k+1;i<=n;i++)
                    printf("%d ",b[i]);
     }
     return 0;
}