{ NOTE: it is recommended to use this even if you don't understand the following code }
const
MAXT = 10000;
var
L, T, i, j : LongInt;
S, D : Array[0..2] of 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 i:=0 to T-1 do
begin
for j:=0 to 2 do
Read(S[j]);
for j:=0 to 2 do
Read(D[j]);
L := 0;
{ INSERT YOUR CODE HERE }
WriteLn(L);
end;
end.
eyBOT1RFOiBpdCBpcyByZWNvbW1lbmRlZCB0byB1c2UgdGhpcyBldmVuIGlmIHlvdSBkb24ndCB1bmRlcnN0YW5kIHRoZSBmb2xsb3dpbmcgY29kZSB9Cgpjb25zdAogICAgTUFYVCA9IDEwMDAwOwoKdmFyCiAgICBMLCBULCBpLCBqIDogTG9uZ0ludDsKICAgIFMsIEQgICAgICAgOiBBcnJheVswLi4yXSBvZiBBbnNpU3RyaW5nOwoKYmVnaW4KewogICAgdW5jb21tZW50IHRoZSB0d28gZm9sbG93aW5nIGxpbmVzIGlmIHlvdSB3YW50IHRvIHJlYWQvd3JpdGUgZnJvbSBmaWxlcwogICAgYXNzaWduKGlucHV0LCAgJ2lucHV0LnR4dCcpOyAgcmVzZXQoaW5wdXQpOwogICAgYXNzaWduKG91dHB1dCwgJ291dHB1dC50eHQnKTsgcmV3cml0ZShvdXRwdXQpOwp9CgogICAgUmVhZExuKFQpOwoKICAgIGZvciBpOj0wIHRvIFQtMSBkbwogICAgYmVnaW4KICAgICAgICBmb3Igajo9MCB0byAyIGRvCiAgICAgICAgICAgIFJlYWQoU1tqXSk7CiAgICAgICAgZm9yIGo6PTAgdG8gMiBkbwogICAgICAgICAgICBSZWFkKERbal0pOwoKICAgICAgICBMIDo9IDA7CgogICAgICAgIHsgSU5TRVJUIFlPVVIgQ09ERSBIRVJFIH0KCgogICAgICAgIFdyaXRlTG4oTCk7CiAgICBlbmQ7CgplbmQuCg==