#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int n, m;
vector<pair<int, int> > v[4000000];
bool g[4000000];
bool vis[4000000];
char ans[4000000];
int make(int i, int j) { return i * m + j; }
void solve() {
  memset(ans, 0, sizeof(ans));
  memset(vis, 0, sizeof(vis));
  cin >> n >> m;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    char buf[20001];
    cin >> buf;
    for (int j = 0; j < m; j++) {
      g[make(i, j)] = (buf[j] == '.' ? 1 : 0);
      if (g[make(i, j)]) {
        cnt++;
        if (i > 0 && g[make(i - 1, j)]) {
          v[make(i, j)].push_back(pair<int, int>(make(i - 1, j), 1));
          v[make(i - 1, j)].push_back(pair<int, int>(make(i, j), 1));
        }
        if (j > 0 && g[make(i, j - 1)]) {
          v[make(i, j)].push_back(pair<int, int>(make(i, j - 1), 2));
          v[make(i, j - 1)].push_back(pair<int, int>(make(i, j), 2));
        }
      }
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      ans[make(i, j)] = (g[make(i, j)] == 1 ? '.' : '*');
  queue<int> q;
  for (int i = 0; i < n * m; i++)
    if (int((v[i]).size()) == 1) q.push(i);
  while (!q.empty()) {
    int i = q.front();
    q.pop();
    vis[i] = 1;
    if (int((v[i]).size()) == 1) {
      int j = v[i][0].first, x = ((i) > (j) ? (j) : (i)),
          y = ((i) > (j) ? (i) : (j));
      if (v[i][0].second == 2) {
        ans[x] = '<';
        ans[y] = '>';
      } else {
        ans[x] = '^';
        ans[y] = 'v';
      }
      for (int k = 0; k < int((v[j]).size()); k++) {
        int l = v[j][k].first;
        for (int h = 0; h < int((v[l]).size()); h++) {
          if (v[l][h].first == j) {
            v[l].erase(v[l].begin() + h);
            break;
          }
        }
        if (int((v[l]).size()) == 1) q.push(l);
      }
      v[i].clear();
      v[j].clear();
      cnt -= 2;
    }
  }
  if (cnt) {
    cout << "Not unique";
    return;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << ans[make(i, j)];
    cout << "\n";
  }
}
int main() {
  solve();
  return 0;
}
