import random
x = random.randint(2,7)
y = x + random.randint(2,5)
a = [[random.randint(-10 , 10) for i in range(y)] for j in range(x)]
n = []
for i in a:
for j in i:
print("{:4d}".format(j), end=' ')
print()
for i in a:
for j in i:
n.append(i[::2])
print(n)