public class checkerBoard{
public static void main(String[] args){
int n = Integer.parseInt(args[0]);
for (int i = 1; i <= n; i++){
for (int j = 1; j <= n; j++){
if (i % 2 == 0){
if(j % n != 0){
if (j % 2 == 0){
System.out.print("*");
}
else System.out.print("-");
}
else{
if (j % 2 == 0){
System.out.println("*");
}
else System.out.println("-");
}
}
else{
if(j % n != 0){
if (j % 2 == 0){
System.out.print("-");
}
else System.out.print("*");
}
else{
if (j % 2 == 0){
System.out.println("-");
}
else System.out.println("*");
}
}
}
}
}
}
IntStream.rangeClosed(1, n).forEach(i -> {
IntStream.rangeClosed(1, n).forEach(j ->
System.out.print((i + j) % 2 == 0 ? '*' : '-'));
System.out.println();});
IntStream.rangeClosed(1, n*n).forEach(i -> System.out.print(i % n != 0 ? (i % 2==0 ?'*':'-') : '\n'));
procedure WriteCheckLine(Len: Integer; Offset: Byte);
var i: Integer;
begin
for i := Offset to Len - 1 + Offset do
begin
if i and 1 > 0 then Write('*')
else Write('-');
end;
WriteLn;
end;
procedure WriteCheckBoard(N: Integer);
var i: Integer;
begin
for i := 0 to N - 1 do WriteCheckLine(N, i and 1);
end;
procedure WriteCheckBoard(N: Integer);
var i, j, Offset: Integer;
begin
for i := 0 to N - 1 do
begin
Offset := i and 1;
for j := Offset to N - 1 + Offset do
begin
if j and 1 > 0 then Write('*')
else Write('-');
end;
WriteLn;
end;
end;