#include <bits/stdc++.h>
using namespace std;
char a[2002][2002];
int n, m;
bool degreeOne(int i, int j) {
  int d = 0;
  if (a[i][j] == '.') {
    if (i > 0 && a[i - 1][j] == '.') d++;
    if (i < n - 1 && a[i + 1][j] == '.') d++;
    if (j > 0 && a[i][j - 1] == '.') d++;
    if (j < m - 1 && a[i][j + 1] == '.') d++;
  }
  return d == 1;
}
pair<int, int> fillOne(int i, int j) {
  pair<int, int> p(i, j);
  if (i > 0 && a[i - 1][j] == '.')
    a[i][j] = 'v', a[i - 1][j] = '^', p.first = i - 1;
  else if (i < n - 1 && a[i + 1][j] == '.')
    a[i][j] = '^', a[i + 1][j] = 'v', p.first = i + 1;
  else if (j > 0 && a[i][j - 1] == '.')
    a[i][j] = '>', a[i][j - 1] = '<', p.second = j - 1;
  else if (j < m - 1 && a[i][j + 1] == '.')
    a[i][j] = '<', a[i][j + 1] = '>', p.second = j + 1;
  return p;
}
void print() {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << a[i][j];
    }
    cout << endl;
  }
}
int main() {
  cin >> n >> m;
  int change;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> a[i];
  }
  queue<pair<int, int> > q;
  for (int i = 0; (i) < (int)(n); (i)++)
    for (int j = 0; (j) < (int)(m); (j)++)
      if (degreeOne(i, j)) q.push(pair<int, int>(i, j));
  while (!q.empty()) {
    pair<int, int> p = q.front();
    q.pop();
    pair<int, int> newp = fillOne(p.first, p.second);
    if (degreeOne(newp.first - 1, newp.second))
      q.push(pair<int, int>(newp.first - 1, newp.second));
    if (degreeOne(newp.first + 1, newp.second))
      q.push(pair<int, int>(newp.first + 1, newp.second));
    if (degreeOne(newp.first, newp.second - 1))
      q.push(pair<int, int>(newp.first, newp.second - 1));
    if (degreeOne(newp.first, newp.second + 1))
      q.push(pair<int, int>(newp.first, newp.second + 1));
    if (degreeOne(p.first - 1, p.second))
      q.push(pair<int, int>(p.first - 1, p.second));
    if (degreeOne(p.first + 1, p.second))
      q.push(pair<int, int>(p.first + 1, p.second));
    if (degreeOne(p.first, p.second - 1))
      q.push(pair<int, int>(p.first, p.second - 1));
    if (degreeOne(p.first, p.second + 1))
      q.push(pair<int, int>(p.first, p.second + 1));
  }
  for (int i = 0; (i) < (int)(n); (i)++)
    for (int j = 0; (j) < (int)(m); (j)++)
      if (a[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
  print();
  return 0;
}
