{ constraints }
const
    MAXN = 500000;

{ input data }
var
    N, M, i : longint;
    A       : array[0..MAXN-1] of int64;
    E       : array[0..MAXN-1] of longint;

begin
{
    uncomment the following lines if you want to read/write from files
    assign(input,  'input.txt');  reset(input);
    assign(output, 'output.txt'); rewrite(output);
}

    readln(N, M);
    for i:=0 to N-1 do
        read(A[i]);
    readln();
    for i:=0 to M-1 do
        read(E[i]);
    readln();

    { insert your code here }

    for i:=0 to M-1 do begin

        { and also here }

        write(42, ' '); { change 42 with actual (int64) answer for i-th group }
    end;
    writeln();
end.
