#include <bits/stdc++.h>
using namespace std;
const int INF = (-1u) / 2;
const long long int INF2 = (-1ull) / 2;
int a, b, i, j, k, n, m, timer = 0, l, r, x, y;
int c[1011000], cnt = 0, fl = 0, a2, a3 = -1000000, ans = 0;
string s[2101];
queue<pair<int, int> > q;
int _count(int x, int y) {
  if (x >= n || x < 0 || y >= m || y < 0 || s[x][y] != '.') return 0;
  int res = 0;
  if (x + 1 < n && s[x + 1][y] == '.') res++;
  if (x - 1 >= 0 && s[x - 1][y] == '.') res++;
  if (y + 1 < m && s[x][y + 1] == '.') res++;
  if (y - 1 >= 0 && s[x][y - 1] == '.') res++;
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (s[i][j] == '.' && _count(i, j) <= 1) q.push(make_pair(i, j));
    }
  }
  while (!q.empty()) {
    x = q.front().first;
    y = q.front().second;
    q.pop();
    if (s[x][y] != '.') continue;
    if (_count(x, y) == 0) {
      cout << "Not unique\n";
      return 0;
    }
    for (int dx = -1; dx <= 1; dx++) {
      for (int dy = -1; dy <= 1; dy++) {
        a = x + dx;
        b = y + dy;
        if (dx * dy == 0 && a < n && a >= 0 && b < m && b >= 0 &&
            s[a][b] == '.') {
          if (y < b) {
            s[x][y] = '<';
            s[a][b] = '>';
            l = a;
            r = b;
          } else if (y > b) {
            s[x][y] = '>';
            s[a][b] = '<';
            l = a;
            r = b;
          } else if (x < a) {
            s[x][y] = '^';
            s[a][b] = 'v';
            l = a;
            r = b;
          } else if (x > a) {
            s[x][y] = 'v';
            s[a][b] = '^';
            l = a;
            r = b;
          }
        }
      }
    }
    if (_count(l + 1, r) == 1) q.push(make_pair(l + 1, r));
    if (_count(l - 1, r) == 1) q.push(make_pair(l - 1, r));
    if (_count(l, r + 1) == 1) q.push(make_pair(l, r + 1));
    if (_count(l, r - 1) == 1) q.push(make_pair(l, r - 1));
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (s[i][j] == '.') {
        cout << "Not unique\n";
        return 0;
      }
    }
  }
  for (i = 0; i < n; i++) cout << s[i] << endl;
  return 0;
}
