#include <bits/stdc++.h>
#define ll long long
#define maxn 100005
#define mod 1000000007
#define pii pair<int, int>
#define ff first
#define ss second
#define io ios_base::sync_with_stdio(0);cin.tie(0);
using namespace std;
ll a[maxn], b[maxn];
priority_queue<pii,vector<pii>, less<pii> > pq;
int main() {
	io
	ll k, n,  m;
	cin >> k >> n >> m;
	for (int i = 0;i < k;i++) cin >> a[i], a[i] *= m;
	ll tot = 0;
	for (int i = 0;i < k;i++) {
		b[i] = a[i] - a[i] % n;	
		tot += b[i];
		pq.push(make_pair(a[i] - b[i], i));
	}
	while (tot < n * m) {
		pii cur = pq.top();
		pq.pop();
		tot += n;
		b[cur.ss] += n;
	}
	for (int i = 0;i < k;i++) cout << b[i] / n << " ";
	cout << endl;
}
/*
*/
#include <algorithm>
#include <iomanip>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <sstream>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <numeric>
#include <vector>
using namespace std;
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif
#define GET_MACRO(_1, _2, _3, NAME, ...) NAME
#define _rep(i, n) _rep2(i, 0, n)
#define _rep2(i, a, b) for(int i = (int)(a); i < (int)(b); i++)
#define rep(...) GET_MACRO(__VA_ARGS__, _rep2, _rep)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using i64 = long long;
template<class T, class U>
bool chmin(T& a, const U& b) { return (b < a) ? (a = b, true) : false; }
template<class T, class U>
bool chmax(T& a, const U& b) { return (b > a) ? (a = b, true) : false; }

template<typename T>istream& operator>>(istream&i,vector<T>&v){rep(j,v.size())i>>v[j];return i;}
template<typename T>string join(vector<T>&v){stringstream s;rep(i,v.size())s<<' '<<v[i];return s.str().substr(1);}
template<typename T>ostream& operator<<(ostream&o,vector<T>&v){if(v.size())o<<join(v);return o;}
template<typename T>string join(vector<vector<T>>&vv){string s="\n";rep(i,vv.size())s+=join(vv[i])+"\n";return s;}
template<typename T>ostream& operator<<(ostream&o,vector<vector<T>>&vv){if(vv.size())o<<join(vv);return o;}
template<class T> using pq = priority_queue<T, vector<T>, greater<T>>;

int main()
{
    int k, n, m;
    cin >> k >> n >> m;

    vector<long double> a(k);
    vector<int> b(k);
    vector<pair<long double, int>> p(k);
    
    cin >> a;

    rep(i, k) b[i] = (a[i] * m) / n + 0.001;

    int r = m - accumulate(all(b), 0);

    rep(i, k) 
    {
        p[i].first = b[i] - (a[i] * m) / n;
        p[i].second = i;
    }
    sort(all(p));

    rep(i, r)
    {
        b[p[i].second]++;
    }

    cout << b << endl;

    return 0;
}