#include <bits/stdc++.h>
using namespace std;
const int M = 2003;
const int inf = 0x7fffffff;
const int mod = 1000000007;
int n, m;
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, -1, 1};
char G[M][M], dg[M][M];
queue<pair<int, int> > Q;
int topu() {
  int i, j, x, y, xx, yy, X, Y;
  pair<int, int> now, next;
  while (!Q.empty()) {
    now = Q.front();
    Q.pop();
    x = now.first;
    y = now.second;
    for (i = 0; i < 4; i++) {
      xx = x + dx[i];
      yy = y + dy[i];
      if (xx < 0 || xx >= n || yy < 0 || yy >= m || G[xx][yy] != '.') continue;
      if (i == 0) {
        G[xx][yy] = '^';
        G[x][y] = 'v';
      } else if (i == 1) {
        G[xx][yy] = 'v';
        G[x][y] = '^';
      } else if (i == 2) {
        G[xx][yy] = '<';
        G[x][y] = '>';
      } else if (i == 3) {
        G[xx][yy] = '>';
        G[x][y] = '<';
      }
      for (j = 0; j < 4; j++) {
        X = xx + dx[j];
        Y = yy + dy[j];
        if (X < 0 || X >= n || Y < 0 || Y >= m || G[X][Y] != '.') continue;
        dg[X][Y]--;
        if (dg[X][Y] == 1) {
          Q.push(make_pair(X, Y));
        }
      }
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (G[i][j] == '.') return 0;
    }
  }
  return 1;
}
int solve() {
  int i, j, cnt, k, x, y;
  while (!Q.empty()) Q.pop();
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (G[i][j] == '*') continue;
      cnt = 0;
      for (k = 0; k < 4; k++) {
        x = i + dx[k];
        y = j + dy[k];
        if (x < 0 || x >= n || y < 0 || y >= m || G[x][y] == '*') continue;
        cnt++;
      }
      dg[i][j] = cnt;
      if (cnt == 1) {
        Q.push(make_pair(i, j));
      }
    }
  }
  if (topu()) return 1;
  return 0;
}
int main() {
  int i, j;
  while (~scanf("%d%d", &n, &m)) {
    for (i = 0; i < n; i++) {
      scanf("%s", G[i]);
    }
    if (solve()) {
      for (i = 0; i < n; i++) {
        printf("%s\n", G[i]);
      }
    } else
      puts("Not unique");
  }
  return 0;
}
