#include <bits/stdc++.h>
using namespace std;
template <typename T>
T abs(T x) {
  return x > 0 ? x : -x;
}
char a[2005][2005];
bool used[2005][2005];
queue<pair<int, int> > q;
int nu() {
  puts("Not unique");
  return 0;
}
bool impasse(int ic, int jc) {
  int cnt = 0;
  cnt += (a[ic][jc - 1] == '.');
  cnt += (a[ic][jc + 1] == '.');
  cnt += (a[ic - 1][jc] == '.');
  cnt += (a[ic + 1][jc] == '.');
  return (cnt < 2);
}
void add(int ic, int jc) {
  if (impasse(ic - 1, jc) && !used[ic - 1][jc]) {
    q.push(make_pair(ic - 1, jc));
    used[ic - 1][jc] = true;
  }
  if (impasse(ic + 1, jc) && !used[ic + 1][jc]) {
    q.push(make_pair(ic + 1, jc));
    used[ic + 1][jc] = true;
  }
  if (impasse(ic, jc - 1) && !used[ic][jc - 1]) {
    q.push(make_pair(ic, jc - 1));
    used[ic][jc - 1] = true;
  }
  if (impasse(ic, jc + 1) && !used[ic][jc + 1]) {
    q.push(make_pair(ic, jc + 1));
    used[ic][jc + 1] = true;
  }
}
int main() {
  int n, m;
  scanf("%d %d\n", &n, &m);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      scanf("%c", &a[i][j]);
    }
    scanf("%c", &a[0][0]);
  }
  for (int i = 0; i <= n + 1; i++) {
    a[i][0] = '*';
    a[i][m + 1] = '*';
  }
  for (int i = 0; i <= m + 1; i++) {
    a[0][i] = '*';
    a[n + 1][i] = '*';
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '*') continue;
      int cnt = 0;
      cnt += (a[i][j - 1] == '.');
      cnt += (a[i][j + 1] == '.');
      cnt += (a[i - 1][j] == '.');
      cnt += (a[i + 1][j] == '.');
      if (cnt == 0) return nu();
      if (cnt == 1) {
        used[i][j] = true;
        q.push(make_pair(i, j));
      }
    }
  while (!q.empty()) {
    int ic = q.front().first;
    int jc = q.front().second;
    q.pop();
    if (a[ic][jc] != '.') continue;
    if (a[ic + 1][jc] == '.') {
      a[ic][jc] = '^';
      a[ic + 1][jc] = 'v';
      add(ic + 1, jc);
    }
    if (a[ic - 1][jc] == '.') {
      a[ic][jc] = 'v';
      a[ic - 1][jc] = '^';
      add(ic - 1, jc);
    }
    if (a[ic][jc + 1] == '.') {
      a[ic][jc] = '<';
      a[ic][jc + 1] = '>';
      add(ic, jc + 1);
    }
    if (a[ic][jc - 1] == '.') {
      a[ic][jc] = '>';
      a[ic][jc - 1] = '<';
      add(ic, jc - 1);
    }
    if (a[ic][jc] == '.') return nu();
    add(ic, jc);
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (a[i][j] == '.') return nu();
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      putchar(a[i][j]);
    }
    putchar('\n');
  }
  return 0;
}
