def ad_elements(matrix): m = len(matrix) n = len(matrix[0]) print(*[matrix[i][n - 1 - i] for i in range(min(m, n))])