#---------------------------- Alternative 1's and 0's ---------------------------------
num= int(input("Enter a number : "))
for i in range(num):
for j in range(num):
if(i % 2 ==0 ):
print('1',end='')
else:
print('0',end='')
print()
#---------------------------- Alternative 0's and 1's -------------------------------------
num= int(input("Enter a number : "))
for i in range(num):
for j in range(num):
print(i % 2 ,end='')
print()
#---------------------------- Hallow square/ frame symbol------------------------------------
num = int(input("Enter number: "))
for i in range(num+1):
for j in range(num+1):
if (i == 0 or i == num or j == 0 or j == num):
print("* ", end='')
else:
print(" ", end='')
print()
#---------------------------- Hallow square/ frame number------------------------------------
num = int(input("Enter number: "))
for i in range(num+1):
for j in range(num+1):
if (i == 0 or i == num or j == 0 or j == num):
print(i, end=' ' )
else:
print(" ", end='')
print()
#---------------------------- Hallow square/ frame albhabets----------------------------------
num = int(input("Enter number: "))
asc = 65
for i in range(num+1):
for j in range(num+1):
if (i == 0 or i == num or j == 0 or j == num):
print(chr(asc+i), end=' ' )
else:
print(" ", end='')
print()
#---------------------------- Alternative 0's and 1's in one line ----------------------------
num= int(input("Enter a number : "))
for i in range(num):
for j in range(num):
if((i+j)%2 == 0 and i % 2 == j % 2 ):
print("1",end='')
else:
print("0",end='')
print()