program a2;
var
f:text;n,i,j:integer;a:array[1..16]of string; t:boolean;
begin
t:=true;
assign(f,'island.in');
reset(f);
read(f,n);
for i:= 1 to 2*n do
readln(f,a[i]);
close(f);
assign(f,'island.out');
rewrite(f);
for i:= 1 to 2*n do
if a[i]<>'1 1 1 1 0' then begin t:=false;break;end;
if t then
begin
writeln(f,'1');
for i:= 1 to 8 do
begin
case i of
1:begin
writeln(f,'* * * * ');
end;
2:begin
writeln(f,' * * * *');
end;
end;
end;
writeln(f,'2');
for i:= 1 to 8 do
begin
case i of
1:begin
writeln(f,' * * * *');
end;
2:begin
writeln(f,'* * * * ');
end;
end;
end;
end
else writeln(f,'no');
close(f);
end.