#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,q,W;
template <typename T>
class seg {
vector<T>tree;
vector<T>busy;
vector<T> *arr;
T n,n4,root,endd;
void mantain(int cl,int cr,int p) {
int cm=cl+((cr-cl)>>1);
if(cl!=cr&&busy[p]!=0) {
busy[2*p]+=busy[p];
busy[2*p+1]+=busy[p];
tree[2*p]+=(cm-cl+1)*busy[p];
tree[2*p+1]+=(cr-cm)*busy[p];
busy[p]=0;
}
}
void build(int s,int t,int p) {
if(s==t) {
tree[p]=(*arr)[s];
return;
}
int m=s+((t-s)>>1);
build(s,m,p*2);
build(m+1,t,p*2+1);
tree[p]=tree[2*p]+tree[2*p+1];
}
void add(int l,int r,int cl,int cr,int v,int p) {
if(l<=cl&&cr<=r) {
tree[p]+=(cr-cl+1)*v;
busy[p]+=v;
return;
}
int m=cl+((cr-cl)>>1);
mantain(cl,cr,p);
if(l<=m)add(l,r,cl,m,v,2*p);
if(r>m)add(l,r,m+1,cr,v,2*p+1);
tree[p] = tree[p * 2] + tree[p * 2 + 1];
return;
}
int summ(int l,int r,int cl,int cr,int p) {
if(l<=cl&&cr<=r) {
return tree[p];
}
mantain(cl,cr,p);
int sum=0,m=cl+((cr-cl)>>1);
if(l<=m)sum+=summ(l,r,cl,m,2*p);
if(r>m)sum+=summ(l,r,m+1,cr,2*p+1);
return sum;
}
public:
explicit seg<T>(vector <T> v) {
n=v.size();
n4=4*n;
tree=vector<T>(n4,0);
busy=vector<T>(n4,0);
arr=&v;
endd = n - 1;
root = 1;
build(0,endd,1);
arr=nullptr;
}
T summ(int l,int r) {
return summ(l,r,0,endd,root);
}
void add(int l,int r,int v) {
add(l,r,0,endd,v,root);
}
};
signed main(){
freopen("wxyt2.in","r",stdin);
int poww[21];
poww[0]=1;
for(int i=1;i<=20;i++)poww[i]=poww[i-1]*2;
cin>>n>>q>>W;
vector <int> lj(n+1,0);
for(int i=0;i<n;i++)scanf("%lld",&lj[i]);
seg<int>s(lj);
for(int i=1;i<=q;i++){
int l,r,d;
scanf("%lld%lld%lld",&l,&r,&d);
s.add(l-1,r-1,d);
int t=0,ans=0,j=0;
for(;;j++){
int temp=s.summ(0,n-1)*poww[j];
if(t+temp>=W){
break;
}else{
t+=temp;
ans+=n;
}
}
int lll=0,rrr=n-1;
while(lll<rrr){
int mid=lll+((rrr-lll)>>1);
int temp=s.summ(0,mid)*poww[j];
if(temp+t>=W){
rrr=mid;
}else{
lll=mid+1;
}
}
ans+=rrr;
printf("%lld:%lld\n",i,ans);
}
return 0;
}