#include using namespace std; using ll = long long; const ll mod = 1e9 + 7; const int N = 200005; const int INF = 0x3f3f3f3f; struct Node { ll v, k; int pos; }; bool operator<(Node x, Node y) { if (x.v != y.v) return x.v > y.v; if (x.k != y.k) return x.k < y.k; return x.pos > y.pos; } ll a[N]; ll b[N], c[N]; ll res[N]; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, h, _; cin >> n >> h >> _; for (int i = 1; i <= n; i++) cin >> a[i]; for (int i = 1; i <= n; i++) { b[i] = (h + a[i] - 1) / a[i]; c[i] = b[i] * a[i]; } priority_queue pq; for (int i = 1; i <= n; i++) pq.push({b[i], c[i], i}); while (_--) { auto [v, k, pos] = pq.top(); pq.pop(); res[pos]++; pq.push({v + b[pos], c[pos], pos}); } for (int i = 1; i <= n; i++) cout << res[i] << " "; cout << "\n"; return 0; }