program rokada;
var
 i,j,y:integer;
 n,m:longint;
 x : array [1..10,1..10] of string;
begin
read(n, m); 
for i := 1 to n do  
    for j := 1 to m do
      begin
        read(x[i,j]);
      end;
y:= -1;
writeln(y);
end.