#include <bits/stdc++.h>
using namespace std;
const long long mxN = 2e3;
long long n, m, k;
char g[mxN][mxN];
long long dx[4] = {0, 1, 0, -1};
long long dy[4] = {1, 0, -1, 0};
char t[4] = {'<', '^', '>', 'v'};
char o[4] = {'>', 'v', '<', '^'};
bool pos(long long x, long long y) {
  return (x >= 0 and x < n and y >= 0 and y < m and g[x][y] == '.');
}
long long deg(long long x, long long y) {
  long long r = 0;
  for (long long i = 0; i < 4; i++) r += pos(x + dx[i], y + dy[i]);
  return r;
}
int32_t main() {
  cin >> n >> m;
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j < m; j++) {
      cin >> g[i][j];
      if (g[i][j] == '.') k++;
    }
  queue<vector<long long>> Q;
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j < m; j++)
      if (deg(i, j) == 1) Q.push({i, j});
  if (Q.empty() and k > 0) {
    cout << "Not unique" << endl;
    return 0;
  }
  while (Q.size()) {
    vector<long long> nd = Q.front();
    Q.pop();
    if (g[nd[0]][nd[1]] != '.') continue;
    for (long long i = 0; i < 4; i++) {
      if (pos(nd[0] + dx[i], nd[1] + dy[i])) {
        g[nd[0]][nd[1]] = t[i];
        g[nd[0] + dx[i]][nd[1] + dy[i]] = o[i];
        k -= 2;
        long long x = nd[0] + dx[i], y = nd[1] + dy[i];
        for (long long i = 0; i < 4; i++) {
          if (pos(x + dx[i], y + dy[i]) and deg(x + dx[i], y + dy[i]) == 1) {
            Q.push({x + dx[i], y + dy[i]});
          }
        }
      }
    }
  }
  if (k == 0) {
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < m; j++) cout << g[i][j];
      cout << endl;
    }
    return 0;
  } else {
    cout << "Not unique" << endl;
  }
}
