#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1.0);
const long double eps = 1e-8;
const int INF = 1E9;
const int MAXN = 2222;
const int dx[] = {-1, 1, 0, 0};
const int dy[] = {0, 0, -1, 1};
const char c[] = {'v', '^', '>', '<'};
int n, m;
string s[MAXN];
int deg[MAXN][MAXN];
int used[MAXN][MAXN];
pair<int, int> p, p2;
queue<pair<int, int> > q;
void decDeg(pair<int, int> P) {
  for (int d = 0; d < (int)(4); d++) {
    pair<int, int> P2 = {P.first + dx[d], P.second + dy[d]};
    if (!(0 <= P2.first && P2.first < n && 0 <= P2.second && P2.second < m))
      continue;
    if (s[P2.first][P2.second] == '.') {
      deg[P2.first][P2.second]--;
      if (deg[P2.first][P2.second] == 1) {
        q.push(P2);
        used[P2.first][P2.second] = 1;
      }
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < (int)(n); i++) cin >> s[i];
  for (int i = 0; i < (int)(n); i++)
    for (int j = 0; j < (int)(m); j++) {
      if (s[i][j] == '.') {
        deg[i][j] = 0;
        used[i][j] = 0;
        for (int d = 0; d < (int)(4); d++) {
          int ii = i + dx[d], jj = j + dy[d];
          if (!(0 <= ii && ii < n && 0 <= jj && jj < m)) continue;
          if (s[ii][jj] == '.') deg[i][j]++;
        }
        if (deg[i][j] == 1) {
          q.push({i, j});
          used[i][j] = 1;
        }
      }
    }
  while (!q.empty()) {
    p = q.front();
    q.pop();
    if (used[p.first][p.second] == 2) continue;
    for (int d = 0; d < (int)(4); d++) {
      p2 = {p.first + dx[d], p.second + dy[d]};
      if (!(0 <= p2.first && p2.first < n && 0 <= p2.second && p2.second < m))
        continue;
      if (s[p2.first][p2.second] == '.') {
        used[p.first][p.second] = 2;
        used[p2.first][p2.second] = 2;
        s[p.first][p.second] = c[d];
        s[p2.first][p2.second] = c[d ^ 1];
        decDeg(p);
        decDeg(p2);
        break;
      }
    }
    if (s[p.first][p.second] == '.') break;
  }
  for (int i = 0; i < (int)(n); i++)
    for (int j = 0; j < (int)(m); j++)
      if (s[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
  for (int i = 0; i < (int)(n); i++) {
    for (int j = 0; j < (int)(m); j++) cout << s[i][j];
    cout << '\n';
  }
  return 0;
}
