#include <bits/stdc++.h>
using namespace std;
string board[2005];
int filled[2005][2005];
char ans[2005][2005];
int n, m;
int dirx[4] = {-1, 0, 1, 0};
int diry[4] = {0, 1, 0, -1};
bool possi(int i, int j) {
  if (i < n and j < m and i >= 0 and j >= 0) return true;
  return false;
}
int check(int r, int c) {
  if (!possi(r, c) || filled[r][c]) return -1;
  int st;
  int flag = 0;
  for (int i = 0, _i = (4); i < _i; ++i) {
    int x = r + dirx[i];
    int y = c + diry[i];
    if (possi(x, y) and !filled[x][y]) {
      flag++;
      st = i;
    }
  }
  if (flag == 1)
    return st;
  else
    return -1;
}
int main() {
  cin >> n >> m;
  for (int i = 0, _i = (n); i < _i; ++i) cin >> board[i];
  memset(filled, 0, sizeof filled);
  for (int i = 0, _i = (n); i < _i; ++i)
    for (int j = 0, _j = (m); j < _j; ++j)
      if (board[i][j] == '*') {
        ans[i][j] = '*';
        filled[i][j] = 1;
      }
  stack<pair<long long int, int> > bp;
  for (int i = 0, _i = (n); i < _i; ++i)
    for (int j = 0, _j = (m); j < _j; ++j)
      if (check(i, j) != -1) bp.push(make_pair(i, j));
  while (!bp.empty()) {
    pair<long long int, int> te = bp.top();
    bp.pop();
    int dir = check(te.first, te.second);
    if (dir == 0) {
      ans[te.first][te.second] = 'v';
      ans[te.first - 1][te.second] = '^';
      filled[te.first][te.second] = 1;
      filled[te.first - 1][te.second] = 1;
    }
    if (dir == 1) {
      ans[te.first][te.second] = '<';
      ans[te.first][te.second + 1] = '>';
      filled[te.first][te.second] = 1;
      filled[te.first][te.second + 1] = 1;
    }
    if (dir == 2) {
      ans[te.first + 1][te.second] = 'v';
      ans[te.first][te.second] = '^';
      filled[te.first + 1][te.second] = 1;
      filled[te.first][te.second] = 1;
    }
    if (dir == 3) {
      ans[te.first][te.second] = '>';
      ans[te.first][te.second - 1] = '<';
      filled[te.first][te.second] = 1;
      filled[te.first][te.second - 1] = 1;
    }
    int x = te.first + dirx[dir];
    int y = te.second + diry[dir];
    for (int i = 0, _i = (4); i < _i; ++i) {
      if (check(x + dirx[i], y + diry[i]) != -1)
        bp.push(make_pair(x + dirx[i], y + diry[i]));
      if (check(te.first + dirx[i], te.second + diry[i]) != -1)
        bp.push(make_pair(te.first + dirx[i], te.second + diry[i]));
    }
  }
  for (int i = 0, _i = (n); i < _i; ++i)
    for (int j = 0, _j = (m); j < _j; ++j)
      if (!filled[i][j]) {
        cout << "Not unique\n";
        return 0;
      }
  for (int i = 0, _i = (n); i < _i; ++i) {
    for (int j = 0, _j = (m); j < _j; ++j) cout << ans[i][j];
    cout << endl;
  }
  return 0;
}
