#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX / 2;
const int Maxn = 2000;
const int dx[] = {-1, 1, 0, 0};
const int dy[] = {0, 0, -1, 1};
int d[Maxn + 5][Maxn + 5], used[Maxn + 5][Maxn + 5], n, m;
char mm[Maxn + 5][Maxn + 5];
void go(pair<pair<int, int>, pair<int, int> >& i) {
  pair<int, int> u = i.first, v = i.second;
  if (u.first == v.first) {
    if (u.second < v.second)
      mm[u.first][u.second] = '<', mm[v.first][v.second] = '>';
    else
      mm[u.first][u.second] = '>', mm[v.first][v.second] = '<';
  } else {
    if (u.first < v.first)
      mm[u.first][u.second] = '^', mm[v.first][v.second] = 'v';
    else
      mm[u.first][u.second] = 'v', mm[v.first][v.second] = '^';
  }
}
int solve() {
  queue<pair<int, int> > q;
  int nx, ny;
  memset(d, 0, sizeof(d));
  memset(used, 0, sizeof(used));
  for (int(i) = (0); (i) <= (n - 1); ++(i))
    for (int(j) = (0); (j) <= (m - 1); ++(j))
      if (mm[i][j] != '*') {
        for (int(k) = (0); (k) <= (3); ++(k)) {
          nx = i + dx[k], ny = j + dy[k];
          if ((0) <= (nx) && (nx) < (n) && (0) <= (ny) && (ny) < (m) &&
              mm[nx][ny] != '*')
            d[nx][ny] += 1;
        }
      }
  for (int(i) = (0); (i) <= (n - 1); ++(i))
    for (int(j) = (0); (j) <= (m - 1); ++(j))
      if (mm[i][j] == '.') {
        if (d[i][j] > 1) continue;
        if (!d[i][j]) return 0;
        q.push(make_pair(i, j));
      }
  vector<pair<pair<int, int>, pair<int, int> > > ans;
  while (!q.empty()) {
    pair<int, int> u = q.front();
    q.pop();
    if (used[u.first][u.second]) continue;
    pair<int, int> v;
    for (int(k) = (0); (k) <= (3); ++(k)) {
      nx = u.first + dx[k], ny = u.second + dy[k];
      if ((0) <= (nx) && (nx) < (n) && (0) <= (ny) && (ny) < (m) && d[nx][ny]) {
        v = make_pair(nx, ny);
        break;
      }
    }
    used[u.first][u.second] = used[v.first][v.second] = 1;
    d[u.first][u.second] = d[v.first][v.second] = 0;
    ans.push_back(make_pair(u, v));
    for (int(k) = (0); (k) <= (3); ++(k)) {
      nx = v.first + dx[k], ny = v.second + dy[k];
      if ((0) <= (nx) && (nx) < (n) && (0) <= (ny) && (ny) < (m) && d[nx][ny]) {
        d[nx][ny] -= 1;
        if (!d[nx][ny]) return 0;
        if (d[nx][ny] == 1) {
          q.push(make_pair(nx, ny));
        }
      }
    }
  }
  for (int(i) = (0); (i) <= (n - 1); ++(i))
    for (int(j) = (0); (j) <= (m - 1); ++(j))
      if (mm[i][j] == '.' && d[i][j]) return 0;
  int sz = ans.size();
  for (int(i) = (0); (i) <= (sz - 1); ++(i)) go(ans[i]);
  for (int(i) = (0); (i) <= (n - 1); ++(i)) cout << mm[i] << endl;
  return 1;
}
int main() {
  cin >> n >> m;
  for (int(i) = (0); (i) <= (n - 1); ++(i)) cin >> mm[i];
  if (!solve()) cout << "Not unique\n";
  return 0;
}
