#include <bits/stdc++.h>
using namespace std;
int const N = 1000007, M = 100007, oo = 1000000007;
vector<pair<int, int> > f;
int n, m;
int dr[] = {-1, 0, 1, 0};
int dc[] = {0, 1, 0, -1};
string s[2004];
pair<int, int> avg;
bool checkone(int a, int b) {
  int res = 0;
  if (a < 0 or a >= n or b < 0 or b >= m) return 0;
  if (s[a][b] != '.') return 0;
  for (int i = 0; i < 4; i++) {
    if ((a + dr[i] >= 0) and (a + dr[i] < n) and (b + dc[i] >= 0) and
        (b + dc[i] < m) and (s[a + dr[i]][b + dc[i]] == '.'))
      ++res;
  }
  return (res == 1);
}
int main() {
  int a, b;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= m; j++) {
      if (checkone(i, j) == 1) {
        f.push_back(pair<int, int>(i, j));
      }
    }
  }
  while (f.size()) {
    avg = f.back();
    f.erase(f.end() - 1);
    for (int i = 0; i < 4; i++) {
      a = avg.first + dr[i];
      b = avg.second + dc[i];
      if (a < 0 or a >= n or b < 0 or b >= m) continue;
      if (s[avg.first + dr[i]][avg.second + dc[i]] == '.') {
        if (i == 0) {
          s[avg.first][avg.second] = 'v';
          s[a][b] = '^';
        } else if (i == 1) {
          s[avg.first][avg.second] = '<';
          s[a][b] = '>';
        } else if (i == 2) {
          s[avg.first][avg.second] = '^';
          s[a][b] = 'v';
        } else {
          s[avg.first][avg.second] = '>';
          s[a][b] = '<';
        }
      }
      for (int i = 0; i < 4; i++) {
        if (checkone(a + dr[i], b + dc[i]))
          f.push_back(pair<int, int>(a + dr[i], b + dc[i]));
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
    }
  }
  for (int i = 0; i < n; i++) cout << s[i] << endl;
}
