#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
#include<math.h>
#include<iomanip>
#include<string>
#include<cassert>
#include<complex>
#include<bits/stdc++.h>
#include<numeric>
#include<cassert>
#include<unordered_map>
#include<unordered_set>


#define rep(s,i,n) for(int i = s;i < n;i++)
 
using namespace std;
 
typedef long long ll; //10e18くらい
typedef long double ld;
typedef __int128_t lll;
typedef pair<ll, ll> pll;
 
const int dx[] = { 0,1,0,-1 };
const int dy[] = { 1,0,-1,0 };
const ll LongINF = 1e13 + 7;
const int INF = 1e9 + 7;
const ll LL_MAX = 9223372036854775807;
const ll LL_MIN = -9223372036854775807;
const double pi = 3.141592653589793;


int dsp[3] = {-1,0,1};

// int keta(ll i){

//   int keta = 0;
//   do{
//     keta++;
//   }while(i /= 10);

//   return keta;
// }
//素因数分解　O(√n)
// vector<pair<ll,ll>> pfactor(ll n){
//   vector<pair<ll,ll>> factor;
//    ll ex; //指数
//    for(ll a = 2; a * a <= n; a++){
//      if(n % a != 0)continue;

//      ll ex = 0;

//      while(n % a == 0){
//        n /= a;
//        ex++;
//      }

//      factor.push_back({a,ex});
//    }

//    if(n != 1) factor.push_back({n,1});

//   return factor; 
// }

// ll gcd(int a, int b) {
//     if (b==0) return a;
//     else return gcd(b, a%b);
// }

// ll lcm(ll a, ll b) {
//     return a * b / gcd(a, b);
// }



//---------------------------------------------------------------------------------------------------
int main() {

    int a,b,c;
    cin >> a >> b >> c;
    int ans = (7-a)+(7-b)+(7-c);
    cout << ans;
  
} 
  


  


//GIVE ME AC!!!!!!!!!!!!!!!!!
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define ll long long
#define floatset() fixed<<setprecision(15)
#define all(n) n.begin(),n.end()
#define rall(n) n.rbegin(),n.rend()
#define rep(i, s, n) for (ll i = s; i < (ll)(n); i++)
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const ll inf =1e18;
const ll MOD=1000000007;
const ll mod=998244353;
const double pi=acos(-1);
using P=pair<ll,ll>;
int main(){
  ll k,n,m;
  cin>>k>>n>>m;
  ll a[k];
  vector<pair<ll,ll>>v;
  ll b[k];
  ll sum=0;
  rep(i,0,k){
    cin>>a[i];
    b[i]=a[i]*m/n;
    sum+=b[i];
    v.push_back({n*b[i]-m*a[i],i});
  }
  sort(all(v));
  sum=m-sum;
  rep(i,0,sum){
    b[v[i].second]++;
  }
  rep(i,0,k){
    if(i){
      cout<<" ";
    }
    cout<<b[i];
  }
  cout<<endl;
}