#include <bits/stdc++.h>
using namespace std;
int n, m;
char a[2005][2005];
queue<pair<int, int> > q;
bool check(int i, int j) {
  int ret = 0;
  if (a[i][j] != '.') return 0;
  if (a[i][j - 1] == '.') ret++;
  if (a[i][j + 1] == '.') ret++;
  if (a[i - 1][j] == '.') ret++;
  if (a[i + 1][j] == '.') ret++;
  return ret == 1;
}
void tryAll(int i, int j) {
  if (check(i, j - 1)) q.push(make_pair(i, j - 1));
  if (check(i, j + 1)) q.push(make_pair(i, j + 1));
  if (check(i + 1, j)) q.push(make_pair(i + 1, j));
  if (check(i - 1, j)) q.push(make_pair(i - 1, j));
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) cin >> a[i][j];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] != '.') continue;
      if (check(i, j)) q.push(make_pair(i, j));
    }
  }
  while (!q.empty()) {
    int i = q.front().first;
    int j = q.front().second;
    q.pop();
    if (a[i][j] != '.') continue;
    if (a[i][j - 1] == '.') {
      a[i][j] = '>', a[i][j - 1] = '<', tryAll(i, j), tryAll(i, j - 1);
    }
    if (a[i][j + 1] == '.') {
      a[i][j] = '<', a[i][j + 1] = '>', tryAll(i, j), tryAll(i, j + 1);
    }
    if (a[i + 1][j] == '.') {
      a[i][j] = '^', a[i + 1][j] = 'v', tryAll(i, j), tryAll(i + 1, j);
    }
    if (a[i - 1][j] == '.') {
      a[i][j] = 'v', a[i - 1][j] = '^', tryAll(i, j), tryAll(i - 1, j);
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '.') {
        cout << "Not unique\n";
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cout << a[i][j];
    }
    cout << "\n";
  }
  return 0;
}
