#include <bits/stdc++.h>
using namespace std;
int rd[] = {0, -1, 1, 0};
int cd[] = {-1, 0, 0, 1};
bool col[2005][2005];
string grid[2005];
int dig[2005][2005];
int n, m;
queue<pair<int, int> > q;
bool has_dot;
bool is_dot(int r, int c) {
  if (r >= 0 && r < n && c >= 0 && c < m && grid[r][c] == '.') return true;
  return false;
}
void change_adjdeg(int cr, int cc) {
  for (int i = 0; i < 4; i++)
    if (is_dot(cr + rd[i], cc + cd[i])) {
      dig[cr + rd[i]][cc + cd[i]]--;
      if (dig[cr + rd[i]][cc + cd[i]] == 1)
        q.push(make_pair(cr + rd[i], cc + cd[i]));
    }
}
int build_solution() {
  if (q.empty() && has_dot) {
    cout << "Not unique\n";
    return 0;
  }
  while (!q.empty()) {
    pair<int, int> cn = q.front();
    int cr = cn.first;
    int cc = cn.second;
    q.pop();
    bool pos = false;
    if (grid[cr][cc] != '.') continue;
    if (is_dot(cr, cc - 1)) {
      change_adjdeg(cr, cc - 1);
      grid[cr][cc] = '>';
      grid[cr][cc - 1] = '<';
      pos = true;
    } else if (is_dot(cr - 1, cc)) {
      change_adjdeg(cr - 1, cc);
      grid[cr][cc] = 'v';
      grid[cr - 1][cc] = '^';
      pos = true;
    } else if (is_dot(cr + 1, cc)) {
      change_adjdeg(cr + 1, cc);
      grid[cr][cc] = '^';
      grid[cr + 1][cc] = 'v';
      pos = true;
    } else if (is_dot(cr, cc + 1)) {
      change_adjdeg(cr, cc + 1);
      grid[cr][cc] = '<';
      grid[cr][cc + 1] = '>';
      pos = true;
    }
    if (!pos) {
      cout << "Not unique\n";
      return 0;
    }
    change_adjdeg(cr, cc);
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (is_dot(i, j)) {
        cout << "Not unique\n";
        return 0;
      }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << grid[i][j];
    cout << endl;
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> grid[i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (grid[i][j] == '.') {
        has_dot = true;
        for (int ad = 0; ad < 4; ad++)
          if (is_dot(i + rd[ad], j + cd[ad])) dig[i][j]++;
      }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (dig[i][j] == 1) q.push(make_pair(i, j));
  build_solution();
  return 0;
}
