const m=15; n=20;
var a: array [1..m, 1..n] of integer;
    b: array [1..m] of boolean;
    i, j: integer;
begin
for i:=1 to m do
 begin
 for j:=1 to n do read(a[i,j]);
 readln;
 end;
writeln;
for i:=1 to m do b[i]:=true;
for i:=1 to m do
 begin
 for j:=1 to n div 2 do
 if a[i,j]<>a[i,n-j+1] then b[i]:=false;
 end;
for i:=1 to m do if b[i] then write('+ ')
                         else write('- ');
readln;
end.