#include <bits/stdc++.h>
using namespace std;
inline int rd() {
  int x = 0;
  bool f = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = 1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return f ? -x : x;
}
char mp[2010][2010];
int n, m, cnt, num[2010][2010], deg[2010][2010];
int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};
queue<pair<int, int> > q;
inline void inq(int x, int y) {
  for (register int i = 0; i < 4; ++i) {
    --deg[x + dx[i]][y + dy[i]];
    if (deg[x + dx[i]][y + dy[i]] == 1) q.push(make_pair(x + dx[i], y + dy[i]));
  }
}
int main() {
  n = rd();
  m = rd();
  char c = getchar();
  for (register int i = 1; i <= n; ++i)
    for (register int j = 1; j <= m; ++j) {
      while (c != '.' && c != '*') c = getchar();
      mp[i][j] = c;
      c = getchar();
    }
  for (register int i = 1; i <= n; ++i)
    for (register int j = 1; j <= m; ++j)
      if (mp[i][j] == '.') {
        deg[i][j] = (mp[i - 1][j] == '.') + (mp[i + 1][j] == '.') +
                    (mp[i][j - 1] == '.') + (mp[i][j + 1] == '.');
        if (deg[i][j] == 1) q.push(make_pair(i, j));
      }
  while (!q.empty()) {
    int x = q.front().first;
    int y = q.front().second;
    q.pop();
    if (deg[x][y] != 1) continue;
    if (mp[x + 1][y] == '.') {
      mp[x][y] = '^';
      mp[x + 1][y] = 'v';
      inq(x + 1, y);
    }
    if (mp[x - 1][y] == '.') {
      mp[x - 1][y] = '^';
      mp[x][y] = 'v';
      inq(x - 1, y);
    }
    if (mp[x][y + 1] == '.') {
      mp[x][y] = '<';
      mp[x][y + 1] = '>';
      inq(x, y + 1);
    }
    if (mp[x][y - 1] == '.') {
      mp[x][y - 1] = '<';
      mp[x][y] = '>';
      inq(x, y - 1);
    }
  }
  for (register int i = 1; i <= n; ++i)
    for (register int j = 1; j <= m; ++j)
      if (mp[i][j] == '.') {
        puts("Not unique");
        return 0;
      }
  for (register int i = 1; i <= n; ++i) {
    for (register int j = 1; j <= m; ++j) putchar(mp[i][j]);
    puts("");
  }
  return 0;
}
