{ NOTE: it is recommended to use this even if you don't understand the following code }

const
    MAXW = 500;

var
    H, N, T, W, i, test          : LongInt;
    end_hole, start_hole, x_wall : Array[0..MAXW-1] of LongInt;
    ans                          : AnsiString;

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

    ReadLn(T);
    for test:=1 to T do begin
        ReadLn(N, H, W);

        for i:=0 to W-1 do
            Read(x_wall[i]);
        ReadLn();

        for i:=0 to W-1 do
            Read(start_hole[i]);
        ReadLn();

        for i:=0 to W-1 do
            Read(end_hole[i]);
        ReadLn();

        ans := '';

        { INSERT YOUR CODE HERE }


        WriteLn(ans);
    end;

end.
