#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2007;
long long n, m;
char a[maxn][maxn];
queue<pair<long long, long long> > Q;
void first(pair<long long, long long> id1, pair<long long, long long> id2) {
  if (id1.first == id2.first) {
    if (id1.second > id2.second)
      a[id1.first][id1.second] = '>', a[id2.first][id2.second] = '<';
    if (id1.second < id2.second)
      a[id1.first][id1.second] = '<', a[id2.first][id2.second] = '>';
  }
  if (id1.second == id2.second) {
    if (id1.first > id2.first)
      a[id1.first][id1.second] = 'v', a[id2.first][id2.second] = '^';
    if (id1.first < id2.first)
      a[id1.first][id1.second] = '^', a[id2.first][id2.second] = 'v';
  }
}
long long deg(pair<long long, long long> id) {
  long long deg = 0;
  if (a[id.first + 1][id.second] == '.') deg++;
  if (a[id.first - 1][id.second] == '.') deg++;
  if (a[id.first][id.second + 1] == '.') deg++;
  if (a[id.first][id.second - 1] == '.') deg++;
  return deg;
}
pair<long long, long long> E(pair<long long, long long> id) {
  pair<long long, long long> e = {-1, -1};
  if (a[id.first + 1][id.second] == '.') e = {id.first + 1, id.second};
  if (a[id.first - 1][id.second] == '.') e = {id.first - 1, id.second};
  if (a[id.first][id.second + 1] == '.') e = {id.first, id.second + 1};
  if (a[id.first][id.second - 1] == '.') e = {id.first, id.second - 1};
  return e;
}
bool CC(pair<long long, long long> cc) {
  if (a[cc.first][cc.second] == '.') return true;
  return false;
}
void PlusQ(pair<long long, long long> c) {
  if (deg({c.first + 1, c.second}) == 1 && CC({c.first + 1, c.second}))
    Q.push({c.first + 1, c.second});
  if (deg({c.first - 1, c.second}) == 1 && CC({c.first - 1, c.second}))
    Q.push({c.first - 1, c.second});
  if (deg({c.first, c.second + 1}) == 1 && CC({c.first, c.second + 1}))
    Q.push({c.first, c.second + 1});
  if (deg({c.first, c.second - 1}) == 1 && CC({c.first, c.second - 1}))
    Q.push({c.first, c.second - 1});
}
int32_t main() {
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= m; j++) {
      cin >> a[i][j];
    }
  }
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= m; j++) {
      if (deg({i, j}) == 1 && a[i][j] == '.') Q.push({i, j});
    }
  }
  while (Q.size()) {
    pair<long long, long long> c = Q.front();
    Q.pop();
    pair<long long, long long> e = E(c);
    if (e.first != -1) first(c, e);
    PlusQ(c);
    PlusQ(e);
  }
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= m; j++) {
      if (a[i][j] == '.') return cout << "Not unique", 0;
    }
  }
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= m; j++) {
      cout << a[i][j];
    }
    cout << endl;
  }
}
