func_code_string: #include <bits/stdc++.h>   #pragma comment(linker,  /STACK:1024000000 )   using namespace std;   struct N {     int x, y;   };   queue<N> q;   char Map[2010][2010];   int jx[] = {-1, 0, 1, 0};   int jy[] = {0, 1, 0, -1};   char CalChar(int dir) {     if (dir == 0) return  v ;     if (dir == 1) return  < ;     if (dir == 2) return  ^ ;     return  > ;   }   int Check(int x, int y, int n, int m) {     bool hav = false;     int dir;     for (int i = 0; i < 4; ++i) {       if (1 <= x + jx[i] && x + jx[i] <= n && 1 <= y + jy[i] && y + jy[i] <= m &&           Map[x + jx[i]][y + jy[i]] ==  . ) {         if (hav) return -1;         hav = true;         dir = i;       }     }     if (hav == false) return -2;     return dir;   }   void Output(int n, int m) {     for (int i = 1; i <= n; ++i) puts(Map[i] + 1);     puts(  );   }   int main() {     int n, m, i, j, tmp;     scanf( %d %d , &n, &m);     for (i = 1; i <= n; ++i) scanf( %s , Map[i] + 1);     for (i = 1; i <= n; ++i) {       for (j = 1; j <= m; ++j) {         if (Map[i][j] ==  . ) {           tmp = Check(i, j, n, m);           if (0 <= tmp) {             q.push((N){i + jx[tmp], j + jy[tmp]});             Map[i][j] = CalChar(tmp);             Map[i + jx[tmp]][j + jy[tmp]] = CalChar((tmp + 2) % 4);           }         }       }     }     N f, t;     while (q.empty() == false) {       f = q.front();       q.pop();       for (i = 0; i < 4; ++i) {         t.x = f.x + jx[i];         t.y = f.y + jy[i];         if (1 <= t.x && t.x <= n && 1 <= t.y && t.y <= m &&             Map[t.x][t.y] ==  . ) {           tmp = Check(t.x, t.y, n, m);           if (tmp == -2) return puts( Not unique ), 0;           if (0 <= tmp) {             Map[t.x][t.y] = CalChar(tmp);             Map[t.x + jx[tmp]][t.y + jy[tmp]] = CalChar((tmp + 2) % 4);             q.push((N){t.x + jx[tmp], t.y + jy[tmp]});           }         }       }     }     for (i = 1; i <= n; ++i) {       for (j = 1; j <= m; ++j)         if (Map[i][j] ==  . ) return puts( Not unique ), 0;     }     for (i = 1; i <= n; ++i) puts(Map[i] + 1);     return 0;   }   