#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 2010;
int n, m, cnt, num;
int in[N][N];
char g[N][N];
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
queue<pair<int, int> > q;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", g[i] + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (g[i][j] == '.') {
        cnt++;
        for (int k = 0; k < 4; k++) {
          int xx = i + dx[k], yy = j + dy[k];
          if (g[xx][yy] == '.') in[i][j]++;
        }
        if (in[i][j] == 1) q.push(make_pair(i, j));
      }
  while (q.size()) {
    int x = q.front().first, y = q.front().second;
    q.pop();
    for (int i = 0; i < 4; i++) {
      int xx = x + dx[i], yy = y + dy[i];
      if (g[xx][yy] == '.') {
        num += 2;
        if (i == 0) g[x][y] = '<', g[xx][yy] = '>';
        if (i == 1) g[x][y] = '>', g[xx][yy] = '<';
        if (i == 2) g[x][y] = '^', g[xx][yy] = 'v';
        if (i == 3) g[x][y] = 'v', g[xx][yy] = '^';
        for (int j = 0; j < 4; j++) {
          int xxx = xx + dx[j], yyy = yy + dy[j];
          if (g[xxx][yyy] == '.') {
            in[xxx][yyy]--;
            if (in[xxx][yyy] == 1) q.push(make_pair(xxx, yyy));
          }
        }
      }
    }
  }
  if (num != cnt)
    printf("Not unique\n");
  else
    for (int i = 1; i <= n; i++) printf("%s\n", g[i] + 1);
  return 0;
}
