#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10;
const double INF = 1e8;
const double PI = acos(-1.0);
const int maxn = 2010;
int m, n;
char c[maxn][maxn];
queue<pair<int, int> > q;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
bool va(int i, int j) { return i >= 0 && i < n && j >= 0 && j < m; }
int cal(int i, int j) {
  int cnt = 0;
  for (int t = (0); t < (4); ++t) {
    if (va(i + dx[t], j + dy[t])) {
      if (c[i + dx[t]][j + dy[t]] == '.') ++cnt;
    }
  }
  return cnt;
}
int main() {
  cin >> n >> m;
  for (int i = (0); i < (n); ++i) scanf("%s", c[i]);
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j < (m); ++j) {
      if (c[i][j] == '.' && cal(i, j) == 0) {
        puts("Not unique");
        return 0;
      }
      if (c[i][j] == '.' && cal(i, j) == 1) q.push(make_pair(i, j));
    }
  while (!q.empty()) {
    pair<int, int> e = q.front();
    q.pop();
    int i = e.first, j = e.second;
    if (c[i][j] != '.' || cal(i, j) != 1) continue;
    int ni, nj;
    int re;
    for (int t = (0); t < (4); ++t) {
      if (va(i + dx[t], j + dy[t]) && c[i + dx[t]][j + dy[t]] == '.')
        ni = i + dx[t], nj = j + dy[t], re = t;
    }
    vector<pair<int, int> > rele;
    for (int t = (0); t < (4); ++t) {
      if (va(i + dx[t], j + dy[t]) && c[i + dx[t]][j + dy[t]] == '.')
        rele.push_back(make_pair(i + dx[t], j + dy[t]));
      if (va(ni + dx[t], nj + dy[t]) && c[ni + dx[t]][nj + dy[t]] == '.')
        rele.push_back(make_pair(ni + dx[t], nj + dy[t]));
    }
    if (re == 0) c[i][j] = '^', c[ni][nj] = 'v';
    if (re == 1) c[i][j] = '<', c[ni][nj] = '>';
    if (re == 2) c[i][j] = 'v', c[ni][nj] = '^';
    if (re == 3) c[i][j] = '>', c[ni][nj] = '<';
    for (int t = (0); t < (rele.size()); ++t) {
      if (c[rele[t].first][rele[t].second] == '.' &&
          cal(rele[t].first, rele[t].second) == 1)
        q.push(rele[t]);
    }
  }
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j < (m); ++j) {
      if (c[i][j] == '.') {
        puts("Not unique");
        return 0;
      }
    }
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) {
      printf("%c", c[i][j]);
    }
    puts("");
  }
}
