#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) v.begin(),v.end()
constexpr ll MOD=1000000007;
constexpr ll INF=2e18;

int main(){
    ll k, n, m; cin >> k >> n >> m;
    VI a(k); REP(i,k) cin >> a[i];
    ll sum=0;
    VI b(k);
    vector<P> p(k);
    REP(i,k){
        b[i]=a[i]*m/n;
        p[i]={a[i]*m-b[i]*n,i};
        sum+=b[i];
    }
    sort(ALL(p));
    REP(i,m-sum){
        b[p[k-1-i].second]++;
    }
    for(auto i:b){
        cout << i << " ";
    }
    cout << endl;
    return 0;
}
#include<cstdio>
typedef __int128 ll;
inline ll in();
inline void wr(ll);
inline ll quick_mod(ll,ll);
int main(int argc,char**argv){
	register ll n=in();
	register bool tp=1;
	for(register ll i=1;i<=100&&tp;++i)
		for(register ll j=1;j<=100&&tp;++j)
			if(quick_mod(3,i)+quick_mod(5,j)==n&&quick_mod(3,i)>0&&quick_mod(5,j)>0)
				wr(i),putchar(' '),wr(j),putchar('\n'),tp=0;
	if(tp)wr(-1),putchar('\n');
}
inline ll quick_mod(ll x,ll y){
	register ll s=1;
	while(y){
		if(y&1)
			if(s*x>s)s=s*x;
			else s=0;
		x=x*x;y>>=1;
	}
	return s;
}
inline ll in(){
	register char c=getchar();
	register ll x=0,f=1;
	for(;c<'0'||c>'9';c=getchar())
		if(c=='-')f=-1;
	for(;c>='0'&&c<='9';c=getchar())
		x=(x<<1)+(x<<3)+(c&15);
	return x*f;
}
inline void wr(ll x){
	if(x<0)putchar('-'),x=-x;
	if(x/10)wr(x/10);
	putchar(x%10+'0');
}