#include <bits/stdc++.h>
using namespace std;
const int N = 2003;
char a[N][N];
vector<pair<int, int> > q;
pair<int, int> tmp;
int n, m;
inline bool f(int x, int y) {
  int res = 0;
  if (a[x][y] != '.') return false;
  if (a[x + 1][y] == '.') res++;
  if (a[x - 1][y] == '.') res++;
  if (a[x][y - 1] == '.') res++;
  if (a[x][y + 1] == '.') res++;
  if (res == 1) return true;
  return false;
}
inline void check(int x, int y) {
  if (f(x + 1, y)) q.push_back(make_pair(x + 1, y));
  if (f(x - 1, y)) q.push_back(make_pair(x - 1, y));
  if (f(x, y + 1)) q.push_back(make_pair(x, y + 1));
  if (f(x, y - 1)) q.push_back(make_pair(x, y - 1));
}
inline void g(int x, int y) {
  if (a[x + 1][y] == '.') {
    a[x][y] = '^';
    a[x + 1][y] = 'v';
    check(x + 1, y);
  }
  if (a[x - 1][y] == '.') {
    a[x][y] = 'v';
    a[x - 1][y] = '^';
    check(x - 1, y);
  }
  if (a[x][y + 1] == '.') {
    a[x][y + 1] = '>';
    a[x][y] = '<';
    check(x, y + 1);
  }
  if (a[x][y - 1] == '.') {
    a[x][y - 1] = '<';
    a[x][y] = '>';
    check(x, y - 1);
  }
}
int main() {
  cin.tie(NULL);
  ios_base::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 (f(i, j)) q.push_back(make_pair(i, j));
  while (!q.empty()) {
    tmp = q.back();
    q.pop_back();
    g(tmp.first, tmp.second);
  }
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; j++)
      if (a[i][j] == '.') return cout << "Not unique", 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) printf("%c", a[i][j]);
    printf("\n");
  }
}
