n = int(input("Enter size of square: ")) #lower right half for i in range(n): for j in range(n): if i+j < n-1: print(' ', end="") else: print('*', end="") print() print() # border for i in range(n): for j in range(n): if i==0 or i==n-1 or j==0 or j==n-1: print('*', end="") else: print(' ', end="") print() print() # big X for i in range(n): for j in range(n): if j==i or j==n-1-i: print('*', end="") else: print(' ', end="") print()