import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
       int i =1;
        int a=0;
        int c = 1;
        int n = in.nextInt();
        int k = in.nextInt();
        int x = in.nextInt();
        int[] niz = new int[n];
        for (int j =0; j<niz.length; j++){
            niz[j]= in.nextInt();
        }
        int[] podniz = new int[k];
        for (int j = 0; j<podniz.length; j++){
            podniz[i]=niz[i];
            for (int z=0; z<podniz.length; z++){
            a+=podniz[z]*c;
            if (z==c) c++;
            }
            c=0;
            System.out.println(a);
        }
    }
    }