#include <bits/stdc++.h>
using namespace std;
struct fast_ios {
  fast_ios() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
  };
} fast_ios_;
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (auto &x : v) is >> x;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &v) {
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i];
    if (i != v.size() - 1) cout << endl;
  };
  return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, pair<T1, T2> p) {
  cout << '(' << p.first << ',' << p.second << ')';
  return os;
}
template <typename T>
void Out(T x) {
  cout << x << endl;
}
template <typename T1, typename T2>
void chOut(bool f, T1 y, T2 n) {
  if (f)
    Out(y);
  else
    Out(n);
}
using vec = vector<long long>;
using mat = vector<vec>;
using Pii = pair<long long, long long>;
using v_bool = vector<bool>;
using v_Pii = vector<Pii>;
long long dx[4] = {1, 0, -1, 0};
long long dy[4] = {0, 1, 0, -1};
const long long mod = 1000000007;
void imp() {
  Out("Not unique");
  exit(0);
}
signed main() {
  long long n, m;
  cin >> n >> m;
  vector<string> s(n);
  cin >> s;
  queue<Pii> que;
  long long S = 0;
  for (long long i = (0); i < (n); i++)
    for (long long j = (0); j < (m); j++)
      if (s[i][j] == '.') {
        S++;
        long long cnt = 0;
        for (long long k = (0); k < (4); k++) {
          long long x = i + dx[k], y = j + dy[k];
          if (x >= 0 && x < n && y >= 0 && y < m && s[x][y] == '.') cnt++;
        }
        if (cnt == 1) que.push(Pii(i, j));
      }
  while (!que.empty()) {
    long long i = que.front().first, j = que.front().second;
    que.pop();
    if (s[i][j] != '.') continue;
    long long k0 = -1;
    for (long long k = (0); k < (4); k++) {
      long long x = i + dx[k], y = j + dy[k];
      if (x >= 0 && x < n && y >= 0 && y < m && s[x][y] == '.') {
        k0 = k;
        break;
      }
    }
    if (k0 == -1) imp();
    long long i2 = i + dx[k0], j2 = j + dy[k0];
    if (k0 == 0)
      s[i][j] = '^', s[i2][j2] = 'v';
    else if (k0 == 1)
      s[i][j] = '<', s[i2][j2] = '>';
    else if (k0 == 2)
      s[i][j] = 'v', s[i2][j2] = '^';
    else if (k0 == 3)
      s[i][j] = '>', s[i2][j2] = '<';
    S -= 2;
    for (long long k = (0); k < (4); k++) {
      long long i3 = i2 + dx[k], j3 = j2 + dy[k];
      if (i3 >= 0 && i3 < n && j3 >= 0 && j3 < m && s[i3][j3] == '.') {
        long long cnt = 0;
        for (long long k3 = (0); k3 < (4); k3++) {
          long long x = i3 + dx[k3], y = j3 + dy[k3];
          if (x >= 0 && x < n && y >= 0 && y < m && s[x][y] == '.') cnt++;
        }
        if (cnt == 1) que.push(Pii(i3, j3));
      }
    }
  }
  if (S != 0)
    imp();
  else
    Out(s);
  return 0;
}
