import numpy as np
import random
n = int(input('Enter the number of rows: '))
m = n
a = np.zeros((n, m), dtype=int)
for i in range(n):
for j in range(m):
a[i, j] = random.randint(-128, 128)
print(f'Start matrix:\n {a}')
c = np.copy(a)
for i in range(n):
for j in range(m):
a[j, n - 1 - i] = c[i, j]
print(f'End matrix:\n {a}')
c = np.copy(a)
for i in range(n):
for j in range(m):
a[j, n - 1 - i] = c[i, j]