#include <bits/stdc++.h>
using namespace std;
long long modpow(long long a, long long p, long long mod) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret = (ret * a) % mod;
    a = (a * a) % mod;
    p /= 2;
  }
  return ret;
}
long long power(long long a, long long p) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret = (ret * a);
    a = (a * a);
    p /= 2;
  }
  return ret;
}
int n, m;
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, -1, 1};
bool check(int i, int j) {
  if (i >= 0 && j >= 0 && i < n && j < m) return 1;
  return 0;
}
int v[2015][2015] = {0}, deg[2015][2015] = {0};
string mat[2015];
queue<pair<int, int> > q;
pair<int, int> p;
int main() {
  int i, j, tmp;
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n >> m;
  int x, y, xx, yy;
  for (i = 0; i < n; i++) cin >> mat[i];
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (mat[i][j] == '.')
        for (x = 0; x < 4; x++) {
          y = x;
          if (check(i + dx[x], j + dy[y]) && mat[i + dx[x]][j + dy[y]] == '.')
            deg[i][j]++;
        }
      if (deg[i][j] == 1) q.push(make_pair(i, j));
    }
  }
  while (!q.empty()) {
    pair<int, int> p;
    p = q.front();
    q.pop();
    i = p.first;
    j = p.second;
    for (x = 0; x < 4; x++) {
      y = x;
      if (check(i + dx[x], j + dy[y]) && mat[i + dx[x]][j + dy[y]] == '.') {
        if (dx[x] == 1) {
          mat[i][j] = '^';
          mat[i + dx[x]][j + dy[y]] = 'v';
        } else if (dx[x] == -1) {
          mat[i][j] = 'v';
          mat[i + dx[x]][j + dy[y]] = '^';
        } else if (dy[y] == 1) {
          mat[i][j] = '<';
          mat[i + dx[x]][j + dy[y]] = '>';
        } else if (dy[y] == -1) {
          mat[i][j] = '>';
          mat[i + dx[x]][j + dy[y]] = '<';
        }
        for (xx = 0; xx < 4; xx++) {
          yy = xx;
          if (check(i + dx[xx], j + dy[yy])) {
            deg[i + dx[xx]][j + dy[yy]]--;
            if (mat[i + dx[xx]][j + dy[yy]] == '.' &&
                deg[i + dx[xx]][j + dy[yy]] == 1)
              q.push(make_pair(i + dx[xx], j + dy[yy]));
          }
          if (check(i + dx[x] + dx[xx], j + dy[y] + dy[yy])) {
            deg[i + dx[x] + dx[xx]][j + dy[y] + dy[yy]]--;
            if (mat[i + dx[x] + dx[xx]][j + dy[y] + dy[yy]] == '.' &&
                deg[i + dx[x] + dx[xx]][j + dy[y] + dy[yy]] == 1)
              q.push(make_pair(i + dx[x] + dx[xx], j + dy[y] + dy[yy]));
          }
        }
        break;
      }
    }
  }
  int f = 1;
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++)
      if (mat[i][j] == '.') f = 0;
  if (f) {
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) cout << mat[i][j];
      cout << endl;
    }
  } else
    cout << "Not unique\n";
  return 0;
}
