#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<int> v[4000000];
char g[4000000];
int make(int i, int j) { return i * m + j; }
void solve() {
  cin >> n >> m;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    char buf[2001];
    cin >> buf;
    for (int j = 0; j < m; j++) {
      g[make(i, j)] = buf[j];
      if (g[make(i, j)] == '.') {
        cnt++;
        if (i > 0 && g[make(i - 1, j)] == '.') {
          v[make(i, j)].push_back(make(i - 1, j));
          v[make(i - 1, j)].push_back(make(i, j));
        }
        if (j > 0 && g[make(i, j - 1)] == '.') {
          v[make(i, j)].push_back(make(i, j - 1));
          v[make(i, j - 1)].push_back(make(i, j));
        }
      }
    }
  }
  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();
    if (int((v[i]).size()) == 1) {
      int j = v[i][0], x = ((i) > (j) ? (j) : (i)), y = ((i) > (j) ? (i) : (j));
      if (x / m == y / m) {
        g[x] = '<';
        g[y] = '>';
      } else {
        g[x] = '^';
        g[y] = 'v';
      }
      for (int k = 0; k < int((v[j]).size()); k++) {
        int l = v[j][k];
        for (int h = 0; h < int((v[l]).size()); h++) {
          if (v[l][h] == 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 << g[make(i, j)];
    cout << "\n";
  }
}
int main() {
  solve();
  return 0;
}
