func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 52;   int n, m, a[N][N], b[N][N], i, j;   int main() {     cin >> n >> m;     for (i = 1; i <= n; i++) {       for (j = 1; j <= m; j++) cin >> a[i][j];     }     for (i = 1; i <= n; i++) {       for (j = 1; j <= m; j++) cin >> b[i][j];     }     for (i = 1; i <= n; i++) {       for (j = 1; j <= m; j++)         if (a[i][j] > b[i][j]) swap(a[i][j], b[i][j]);     }     for (i = 1; i <= n; i++) {       for (j = 1; j <= m; j++) {         if (a[i][j] <= a[i][j - 1] || i < n && (a[i][j] >= a[i + 1][j])) {           cout <<  Impossible ;           return 0;         }       }     }     for (i = 1; i <= n; i++) {       for (j = 1; j <= m; j++) {         if (b[i][j] <= b[i][j - 1] || i < n && (b[i][j] >= b[i + 1][j])) {           cout <<  Impossible ;           return 0;         }       }     }     cout <<  Possible ;   }   