func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2010;   struct point {     point(int xx, int yy) : x(xx), y(yy) {}     int x, y;   };   int n, m;   char a[N][N];   queue<point> q;   int dx[4] = {-1, 1, 0, 0};   int dy[4] = {0, 0, -1, 1};   long long pp;   bool uniq(int xx, int yy) {     if (a[xx][yy] !=  . ) {       return false;     }     int counter = 0;     for (int i = 0; i < 4; ++i) {       int x = xx + dx[i];       int y = yy + dy[i];       if (a[x][y] ==  . ) {         ++counter;       }     }     return (counter == 1);   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cin >> n >> m;     for (int i = 0; i <= n + 1; ++i) {       for (int j = 0; j <= m + 1; ++j) {         if (i == 0 || j == 0 || i == n + 1 || j == m + 1) {           a[i][j] =  * ;           continue;         }         cin >> a[i][j];         if (a[i][j] ==  . ) {           ++pp;         }       }     }     for (int i = 1; i <= n; ++i) {       for (int j = 1; j <= m; ++j) {         if (a[i][j] ==  * ) {           continue;         }         int counter = 0;         if (a[i][j + 1] ==  . ) {           ++counter;         }         if (a[i][j - 1] ==  . ) {           ++counter;         }         if (a[i - 1][j] ==  . ) {           ++counter;         }         if (a[i + 1][j] ==  . ) {           ++counter;         }         if (counter == 0) {           cout <<  Not unique ;           return 0;         }         if (counter == 1) {           q.push(point(i, j));         }       }     }     while (true) {       if (q.empty()) {         break;       }       point cur = q.front();       q.pop();       if (a[cur.x][cur.y] !=  . ) {         continue;       }       if (!uniq(cur.x, cur.y)) {         cout <<  Not unique ;         return 0;       }       int xx = cur.x;       int yy = cur.y;       for (int i = 0; i < 4; ++i) {         xx += dx[i];         yy += dy[i];         if (a[xx][yy] ==  . ) {           break;         }         xx -= dx[i];         yy -= dy[i];       }       if (yy == cur.y) {         if (xx < cur.x) {           a[cur.x][cur.y] =  v ;           a[xx][yy] =  ^ ;         } else {           a[xx][yy] =  v ;           a[cur.x][cur.y] =  ^ ;         }       }       if (xx == cur.x) {         if (yy < cur.y) {           a[cur.x][cur.y] =  > ;           a[xx][yy] =  < ;         } else {           a[cur.x][cur.y] =  < ;           a[xx][yy] =  > ;         }       }       pp -= 2;       for (int i = 0; i < 4; ++i) {         if (uniq(xx + dx[i], yy + dy[i])) {           q.push(point(xx + dx[i], yy + dy[i]));         }       }     }     if (pp > 0) {       cout <<  Not unique ;       return 0;     }     for (int i = 1; i <= n; ++i) {       for (int j = 1; j <= m; ++j) {         cout << a[i][j];       }       cout << endl;     }     return 0;   }   