#include <bits/stdc++.h>
using namespace std;
char g[2001][2001];
int n, m, w, c;
int dr[] = {1, -1, 0, 0};
int dc[] = {0, 0, 1, -1};
int deg[2001][2001];
void BFS() {
  queue<pair<int, int> > q;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (g[i][j] == '.') {
        ++c;
        for (int k = 0; k < 4; k++) {
          int nr = dr[k] + i;
          int nc = dc[k] + j;
          if (nr < 0 || nr >= n || nc < 0 || nc >= m) continue;
          if (g[nr][nc] == '.') deg[i][j]++;
        }
        if (deg[i][j] == 1) q.push(make_pair(i, j));
      }
    }
  if (c % 2 != 0) {
    cout << "Not unique" << endl;
    return;
  }
  while (!q.empty()) {
    int x = q.front().first, y = q.front().second;
    q.pop();
    if (g[x][y] == '.') {
      int i = -1, j = -1;
      for (int k = 0; k < 4; k++) {
        int nr = dr[k] + x;
        int nc = dc[k] + y;
        if (nr < 0 || nr >= n || nc < 0 || nc >= m || g[nr][nc] != '.')
          continue;
        i = nr;
        j = nc;
        break;
      }
      if (i == -1) {
        cout << "Not unique" << endl;
        return;
      }
      if (i > x)
        g[i][j] = 'v', g[x][y] = '^';
      else if (i < x)
        g[i][j] = '^', g[x][y] = 'v';
      else if (j > y)
        g[i][j] = '>', g[x][y] = '<';
      else if (j < y)
        g[i][j] = '<', g[x][y] = '>';
      deg[i][j] = 0;
      deg[x][y] = 0;
      for (int k = 0; k < 4; k++) {
        int nr = dr[k] + i;
        int nc = dc[k] + j;
        if (nr < 0 || nr >= n || nc < 0 || nc >= m || g[nr][nc] != '.')
          continue;
        deg[nr][nc]--;
        if (deg[nr][nc] == 1) q.push(make_pair(nr, nc));
      }
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (g[i][j] == '.') {
        cout << "Not unique" << endl;
        return;
      }
    }
  for (int i = 0; i < n; i++, puts(""))
    for (int j = 0; j < m; j++) {
      cout << g[i][j];
    }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> g[i][j];
    }
  }
  BFS();
}
