#include <bits/stdc++.h>
using namespace std;
char a[2001][2001];
bool used[2001][2001];
int cnt[2001][2001];
queue<pair<int, int> > q;
int n, m;
int tx[4] = {0, 0, 1, -1};
int ty[4] = {1, -1, 0, 0};
int main() {
  scanf("%d%d\n", &n, &m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) scanf("%c", &a[i][j]);
    scanf("\n");
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '*') continue;
      for (int t = 0; t < 4; t++) {
        int tox = j + tx[t];
        int toy = i + ty[t];
        if (tox < 0 || tox >= m || toy < 0 || toy >= n) continue;
        if (a[toy][tox] == '.') cnt[i][j]++;
      }
      if (cnt[i][j] == 1) used[i][j] = true, q.push(make_pair(i, j));
    }
  while (!q.empty()) {
    int vx = q.front().second;
    int vy = q.front().first;
    q.pop();
    if (a[vy][vx] != '.') continue;
    for (int i = 0; i < 4; i++) {
      int xx = vx + tx[i];
      int yy = vy + ty[i];
      if (xx < 0 || xx >= m || yy < 0 || yy >= n) continue;
      if (a[yy][xx] != '.') continue;
      if (i <= 1) {
        a[vy][vx] = '^';
        a[yy][xx] = 'v';
        if (i == 1) swap(a[vy][vx], a[yy][xx]);
      } else {
        a[vy][vx] = '<';
        a[yy][xx] = '>';
        if (i == 3) swap(a[vy][vx], a[yy][xx]);
      }
      for (int j = 0; j < 4; j++) {
        int tox = xx + tx[j];
        int toy = yy + ty[j];
        if (tox < 0 || tox >= m || toy < 0 || toy >= n) continue;
        if (a[toy][tox] != '.') continue;
        cnt[toy][tox]--;
        if (cnt[toy][tox] == 1) q.push(make_pair(toy, tox)), cnt[toy][tox] = 0;
      }
    }
  }
  bool ok = false;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (a[i][j] == '.') ok = true;
  if (ok) {
    cout << "Not unique";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << a[i][j];
    cout << "\n";
  }
  return 0;
}
