#define _USE_MA_DEFINES
#include <iostream>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <algorithm>
#include <climits>
#include <cstring>
#include <cmath>
#include <stack>
#include <iomanip>
#include <tuple>
#include <functional>
#include <cfloat>
#include <map>
#include <set>
#include <array>
#include <stdio.h>
#include <string.h>
#include <random>
#include <cassert>
using ll = long long;
using ull = unsigned long long;
using uint = unsigned int;
using namespace std;
#define int long long
#define CONTAINS_VEC(v,n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a)+(size))
#define REMOVE(v,a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define ARY_REVERSE(v,a) (reverse((v), (v)+(a)))
#define REP(i, n) for (int (i)=0; (i) < (n); (i)++)
#define REPE(i, n) for (int (i)=0; (i) <= (n); (i)++)
#define CONTAINS_MAP(m, a) ((m).find((a)) != m.end())
#define CONTAINS_SET(m, a) ((m).find((a)) != m.end())
void YesNo(bool b) { cout << (b ? "Yes" : "No") << endl; exit(0); }
void Yes() { cout << "Yes" << endl; exit(0); }
void No() { cout << "No" << endl; exit(0); }




int OFFSET = 10000;

//---------- にぶたん[f,f,f,f,'t',t,t,t] ----------
template <typename BSFunc>
int binary_search(int l, int r, BSFunc isOK)
{
	int left = l - 1;
	int right = r;
	while ((right - left) > 1)
	{
		int mid = left + (right - left) / 2;
		if (isOK(mid))
			right = mid;
		else
			left = mid;
	}
	return right;
}

int func(double Xf, double Yf, double Rf)
{
	int Xd, Yd, Rd;
	Xd = llround(Xf * OFFSET);
	Yd = llround(Yf * OFFSET);
	Rd = llround(Rf * OFFSET);

	int rx = floor(Xf + Rf);
	int lx = ceil(Xf - Rf);

	int ans = 0;
	for (int x = lx; x <= rx; x++)
	{
		int target_x = Xd - (x * OFFSET);

		int sy = ceil(Yf);
		int ty = binary_search(sy, 300000LL, [&](int index)
		{
			if ((index * OFFSET - Yd) * (index * OFFSET - Yd) > Rd * Rd - target_x * target_x)
			{
				return true;
			}
			return false;
		});
		ty--;
		if ((Yd - ty * OFFSET) * (Yd - ty * OFFSET) <= Rd * Rd - target_x * target_x)
		{
			int by = binary_search(-300000LL, ty, [&](int index)
			{
				if ((Yd - index * OFFSET) * (Yd - index * OFFSET) <= Rd * Rd - target_x * target_x)
				{
					return true;
				}
				return false;
			});
			ans += (int)(ty - by) + 1;
		}
	}
	return ans;
}

signed main()
{
	long double Xf, Yf, Rf;
	cin >> Xf >> Yf >> Rf;
	cout << func(Xf, Yf, Rf);
}





#include <bits/stdc++.h>
using namespace std;

typedef int_fast32_t int32;
typedef int_fast64_t int64;

const int32 inf = 1e9+7;
const int32 MOD = 1000000007;
const int64 llinf = 1e18;

#define YES(n) cout << ((n) ? "YES\n" : "NO\n"  )
#define Yes(n) cout << ((n) ? "Yes\n" : "No\n"  )
#define POSSIBLE(n) cout << ((n) ? "POSSIBLE\n" : "IMPOSSIBLE\n"  )
#define ANS(n) cout << (n) << "\n"
#define REP(i,n) for(int64 i=0;i<(n);++i)
#define FOR(i,a,b) for(int64 i=(a);i<(b);i++)
#define FORR(i,a,b) for(int64 i=(a);i>=(b);i--)
#define all(obj) (obj).begin(),(obj).end()
#define rall(obj) (obj).rbegin(),(obj).rend()
#define fi first
#define se second
#define pb(a) push_back(a)
typedef pair<int32,int32> pii;
typedef pair<int64,int64> pll;

template<class T> inline bool chmax(T& a, T b) {
  if (a < b) { a = b; return true; } return false;
}
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) { a = b; return true; } return false;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int64 k,n,m;
  cin >> k >> n >> m;
  vector<int64> a(k);
  REP(i,k)cin >> a[i];

  priority_queue<pll> que;
  vector<int64> b(k);
  int64 s = 0;
  REP(i,k){
    b[i] = m * a[i] / n;
    s += b[i];
    que.emplace(m * a[i] % n, i);
  }
  REP(i,m-s){
    b[que.top().se]++;
    que.pop();
  }
  REP(i,k){
    if(i != 0)cout << " ";
    cout << b[i];
  }
  cout << endl;
  return 0;
}