#include <bits/stdc++.h>
using namespace std;
template <class T>
void chkmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
void chkmin(T &a, T b) {
  if (a > b) a = b;
}
int n, m, d[2500][2500], ans;
char s[2500][2500];
bool vis[2500][2500];
queue<pair<int, int> > q;
char rlt[2500][2500];
void input() {
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '*') continue;
      if (!d[i][j]) {
        ans = 0;
        return;
      }
      if (d[i][j] == 1) q.push(make_pair(i, j));
    }
  }
}
pair<int, int> mov(pair<int, int> a, int i) {
  if (i == 0) return make_pair(a.first - 1, a.second);
  if (i == 1) return make_pair(a.first + 1, a.second);
  if (i == 2) return make_pair(a.first, a.second - 1);
  return make_pair(a.first, a.second + 1);
}
bool ins(pair<int, int> a) {
  if (a.first && a.second && a.first <= n && a.second <= m) return true;
  return false;
}
void func() {
  while (!q.empty()) {
    pair<int, int> u = q.front();
    q.pop();
    if (vis[u.first][u.second]) continue;
    pair<int, int> v;
    int i;
    for (i = 0; i < 4; i++) {
      v = mov(u, i);
      if (ins(v) && !vis[v.first][v.second] && s[v.first][v.second] == '.')
        break;
    }
    if (i == 0) rlt[u.first][u.second] = 'v', rlt[v.first][v.second] = '^';
    if (i == 1) rlt[u.first][u.second] = '^', rlt[v.first][v.second] = 'v';
    if (i == 2) rlt[u.first][u.second] = '>', rlt[v.first][v.second] = '<';
    if (i == 3) rlt[u.first][u.second] = '<', rlt[v.first][v.second] = '>';
    vis[u.first][u.second] = vis[v.first][v.second] = 1;
    pair<int, int> p;
    for (int j = 0; j < 4; j++) {
      p = mov(v, j);
      if (ins(p) && !vis[p.first][p.second] && s[p.first][p.second]) {
        d[p.first][p.second]--;
        if (!d[p.first][p.second]) {
          ans = 0;
          return;
        }
        if (d[p.first][p.second] == 1) q.push(p);
      }
    }
  }
}
void last() {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '*') continue;
      if (!vis[i][j]) {
        ans = 0;
        return;
      }
    }
}
int main() {
  scanf("%d%d ", &n, &m);
  for (int i = 1; i <= n; i++) gets(s[i] + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j < m; j++) {
      if (s[i][j] == '.' && s[i][j + 1] == '.') {
        d[i][j]++;
        d[i][j + 1]++;
      }
    }
  for (int j = 1; j <= m; j++)
    for (int i = 1; i < n; i++) {
      if (s[i][j] == '.' && s[i + 1][j] == '.') {
        d[i][j]++;
        d[i + 1][j]++;
      }
    }
  ans = 1;
  input();
  if (ans) func();
  last();
  if (!ans)
    puts("Not unique");
  else {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        if (!rlt[i][j])
          putchar('*');
        else
          putchar(rlt[i][j]);
      }
      puts("");
    }
  }
  return 0;
}
