#include #include using namespace std; using namespace atcoder; using ll = long long; using mint = modint998244353; using vi = vector; using vvi = vector; using vvvi = vector; using vll = vector; using vvll = vector; using vvvll = vector; using vmi = vector; using vvmi = vector; using vvvmi = vector; #define all(a) (a).begin(), (a).end() #define rep2(i, m, n) for (int i = (m); i < (n); ++i) #define rep(i, n) rep2(i, 0, n) #define drep2(i, m, n) for (int i = (m)-1; i >= (n); --i) #define drep(i, n) drep2(i, n, 0) void solve(){ } using p = pair; using q = pair; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll n, h, t; cin >> n >> h >> t; vll a(n); rep(i, n)cin >> a[i]; vll ans(n, 0); vll b(n); rep(i, n)b[i] = (h+a[i]-1)/a[i]; auto comp = [](q a, q b) -> bool{ if(a.first != b.first)return a.first > b.first; if(a.second.first != b.second.first)return a.second.first < b.second.first; return a.second.second > b.second.second; }; priority_queue, decltype(comp)> pq(comp); rep(i, n)pq.push({b[i], {b[i]*a[i], i}}); rep(i, t){ auto [c, d] = pq.top(); pq.pop(); ans[d.second]++; pq.push({c+b[d.second], d}); } rep(i, n)cout << ans[i] << " "; cout << endl; return 0; }