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

int main()
{
    ll n, k, x;
    cin>>n>>k>>x;
    vector<ll> p(n);
    bool prvi=false;
    for (ll i=0; i<n; i++){
            cin>>p[i];}
    for (ll i=0; i<n-k+1; i++){
        ll c=1;
        ll s=0;
        for(int j=i; j<i+k;j++){
            cout<<p[j]<<"*"<<min(x,c)<<"=";
            s+=p[j]*min(x,c);
            cout<<min(x,c)*p[j]<<" ";
            c++;
        }

        cout<<s<<" ";
    }
}