#include<bits/stdc++.h>
#define rei register int
#define ll long long
#define PLL pair<ll,ll>
#define mk make_pair
using namespace std;

const int N=1e5+100;
ll k,n,m;
ll a[N],b[N];
priority_queue<PLL>p;

int main(){
	scanf("%d%d%d",&k,&n,&m);
	ll sum=0;
	for(rei i=1;i<=k;++i){
		scanf("%d",&a[i]);
		b[i]=(m*a[i])/n;
		sum+=b[i];
		ll temp=m*a[i]-n*b[i];
		p.push(mk(temp,i));
	}
	while(sum<m){
		++b[p.top().second];
		p.pop();
		++sum;
	}
	for(rei i=1;i<=k;++i)
		printf("%d ",b[i]);
	puts("");
	return 0;	
}
/*
@author: Saurav Sihag
*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ull unsigned long long
#define ff first
#define ss second
#define lld long double

template <class T>
void print(vector<T>& v){
    for(T x:v) cout<<x<<" ";
    cout<<"\n";
}


void inp(vector<ll>& v, int n){
    for (int i=0; i<n; ++i) scanf("%lld", &v[i]);
}

// const int nax=1e+5+5;
// const int inf=1e+9+5;
const ll mod=1e+9+7;
// const ll mod=998244353;
const ll nax=1e+17+5;
// const int dx[4]={0,0,-1,1};
// const int dy[4]={1,-1,0,0};

lld dp[101][101][101];

lld recur(int a, int b, int c){
    if (a==100 || b==100 || c==100) return 0;
    if (dp[a][b][c]!=-1) return dp[a][b][c];
    lld res=0, aa=a, bb=b, cc=c, d=(aa+bb+cc);
    if (a>0){
        res+=aa*(recur(a+1, b, c)+1.0);
    }
    if (b>0){
        res+=bb*(recur(a, b+1, c)+1.0);
    }
    if (c>0){
        res+=cc*(recur(a, b, c+1)+1.0);
    }
    res/=d;
    // cout<<a<<" "<<b<<" "<<c<<" res="<<res<<endl;
    return dp[a][b][c]=res;
}

void sol(){
    int a, b, c;
    cin>>a>>b>>c;
    // memset(dp, -1, sizeof(dp));
    for (int i=0; i<101; ++i) for (int j=0; j<101; ++j) for (int k=0; k<101; ++k) dp[i][j][k]=-1;
    lld res=recur(a, b, c);
    cout<<res<<endl;
    return ;
}



int main() {
    int t;
    t=1;
    // cin>>t;
    t++;
    std::cout << std::setprecision(20);
    for (int i=1; i<t; ++i){ 
        // printf("Case #%d: ", i);
        sol();
    }
    return 0;
}