#include <bits/stdc++.h>
using namespace std;
const int N = 2000;
const int oo = 1e9 + 5;
int du[] = {-1, 0, 0, 1};
int dv[] = {0, -1, 1, 0};
const long long mod = 1e9 + 7;
long long sqr(long long x) { return x * x; }
int n, m, deg[N + 5][N + 5];
queue<pair<int, int> > q;
char a[N + 5][N + 5];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      cin >> a[i][j];
      if (a[i][j] == '.') {
        for (int d = 0; d < 4; d++) {
          int u = i + du[d], v = j + dv[d];
          if (u < 1 || u > n || v < 1 || v > m || a[u][v] != '.') continue;
          deg[i][j]++;
          deg[u][v]++;
        }
      }
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (deg[i][j] == 1) q.push(pair<int, int>(i, j));
  while (!q.empty()) {
    pair<int, int> now = q.front();
    q.pop();
    int u1 = now.first, v1 = now.second;
    if (deg[u1][v1] != 1) continue;
    for (int i = 0; i < 4; i++) {
      int u = u1 + du[i], v = v1 + dv[i];
      if (u < 1 || u > n || v < 1 || v > m || a[u][v] != '.') continue;
      if (i == 0) {
        a[u][v] = '^';
        a[u1][v1] = 'v';
      }
      if (i == 1) {
        a[u][v] = '<';
        a[u1][v1] = '>';
      }
      if (i == 2) {
        a[u][v] = '>';
        a[u1][v1] = '<';
      }
      if (i == 3) {
        a[u][v] = 'v';
        a[u1][v1] = '^';
      }
      deg[u][v] = 0;
      u1 = u;
      v1 = v;
      for (int d = 0; d < 4; d++) {
        int u = u1 + du[d], v = v1 + dv[d];
        if (u < 1 || u > n || v < 1 || v > m || a[u][v] != '.') continue;
        deg[u][v]--;
        if (deg[u][v] == 1) q.push(pair<int, int>(u, v));
      }
      break;
    }
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (a[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) cout << a[i][j];
    cout << endl;
  }
  return 0;
}
