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

int main()
{
  int K, N, M;
  std::cin >> K >> N >> M;
  std::vector<long long> as(K);
  for (auto& a : as) { std::cin >> a; }

  std::vector<long long> bs(K);
  for (int i = 0; i < K; i++)
  {
    bs[i] = (as[i] * M) / N;
  }

  int remain = M - std::accumulate(bs.begin(), bs.end(), 0);

  struct Score { int id; long long value; };
  std::vector<Score> scores(K);
  for (int i = 0; i < K; i++)
  {
    scores[i] = { i, std::abs(bs[i] * N - as[i] * M) };
  }

  std::sort(scores.begin(), scores.end(),
    [&](auto& a, auto& b) {return a.value > b.value; });

  for (int i = 0; i < remain; i++)
  {
    bs[scores[i].id] += 1;
  }

  for (auto& e : bs)
  {
    std::cout << e << " ";
  }
  std::cout << std::endl;
  return 0;
}

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

#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int k;
ll n,m,a[100001],b[100001],cnt,s;
vector< pair<ll, int> > r(100001);

int main(){
    cin >> k >> n>> m;
    rep(i,k)cin>>a[i];
    rep(i,k){
        cnt = a[i]*m;
        b[i] = cnt/n;
        s += b[i];
        r.push_back(pair<ll,int>(-cnt%n, i));
    }

    sort(r.begin(), r.end());
    rep(i,m-s){
        b[r[i].second]++;
    }
    rep(i,k)cout << b[i] << " ";cout << endl;

}