def swap_columns(a, i, j):
for k in range(len(a)):
a[k][i], a[k][j] = a[k][j], a[k][i]
n, m = [int(i) for i in input().split()]
a = [[int(j) for j in input().split()] for i in range(n)]
i, j = [int(i) for i in input().split()]
swap_columns(a, i, j)
print('\n'.join([' '.join([str(i) for i in row]) for row in a]))
3 тапсырма
n, m = [int(i) for i in input().split()]
a = [[int(j) for j in input().split()] for i in range(n)]
best_i, best_j = 0, 0
curr_max = a[0][0]
for i in range(n):
for j in range(m):
if a[i][j] > curr_max:
curr_max = a[i][j]
best_i, best_j = i, j
print(best_i, best_j)
2 тапсырма 2 есеп
s = 'akdjfjdkkkdhrf'
print (len (s))
print (s.count ('k'))