#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5;
const int dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0};
int n, m, deg[N * N];
vector<int> g[N * N];
char s[N][N], ans[N * N];
queue<int> q;
int id(int x, int y) { return (x - 1) * m + y; }
void add(int x, int y) { g[x].push_back(y), deg[y]++; }
bool solve() {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (s[i][j] == '.' && !deg[id(i, j)]) return 0;
  for (int i = 1; i <= n * m; i++)
    if (deg[i] == 1) {
      q.push(i);
    }
  while (q.size()) {
    int x = q.front();
    q.pop();
    if (!deg[x]) {
      continue;
    }
    deg[x] = 0;
    int y = 0;
    for (int i = 0; i < g[x].size(); i++) {
      if (!deg[g[x][i]]) continue;
      y = g[x][i];
      break;
    }
    if (!y) return 0;
    deg[y] = 0;
    if (y == x + m)
      ans[x] = '^', ans[y] = 'v';
    else if (x == y + m)
      ans[x] = 'v', ans[y] = '^';
    else if (y == x + 1)
      ans[x] = '<', ans[y] = '>';
    else
      ans[x] = '>', ans[y] = '<';
    for (int i = 0; i < g[x].size(); i++) {
      int t = g[x][i];
      if (!deg[t]) continue;
      --deg[t];
      if (deg[t] == 1) q.push(t);
    }
    for (int i = 0; i < g[y].size(); i++) {
      int t = g[y][i];
      if (!deg[t]) continue;
      --deg[t];
      if (deg[t] == 1) q.push(t);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (deg[i]) return 0;
  }
  for (int i = 1; i <= n * m; i++)
    if (ans[i] == '#') return 0;
  return 1;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    scanf("%s", s[i] + 1);
    for (int j = 1; j <= m; j++) ans[id(i, j)] = '#';
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '*') {
        ans[id(i, j)] = '*';
        continue;
      }
      for (int k = 0; k <= 3; k++) {
        int tx = i + dx[k], ty = j + dy[k];
        if (tx < 1 || ty < 1 || tx > n || ty > m || s[tx][ty] == '*') continue;
        add(id(i, j), id(tx, ty));
      }
    }
  }
  if (!solve())
    puts("Not unique");
  else
    for (int i = 1; i <= n * m; i++) {
      printf("%c", ans[i]);
      if (i % m == 0) puts("");
    }
  return 0;
}
