#include <bits/stdc++.h>
long long mpow(long long a, long long n, long long mod) {
  long long ret = 1;
  long long b = a;
  while (n) {
    if (n & 1) ret = (ret * b) % mod;
    b = (b * b) % mod;
    n >>= 1;
  }
  return (long long)ret;
}
using namespace std;
using namespace std;
char s[(int)(2e3 + 4)][(int)(2e3 + 4)];
int n, m, cdot;
int deg[(int)(2e3 + 4)][(int)(2e3 + 4)];
char soln[(int)(2e3 + 4)][(int)(2e3 + 4)];
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};
queue<pair<int, int> > q;
bool valid(int x, int y) {
  if (x >= 0 && x < n && y >= 0 && y < m && s[x][y] == '.') return true;
  return false;
}
void solve() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> s[i];
  bool not_ans = true;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      int c = 0;
      soln[i][j] = s[i][j];
      if (s[i][j] == '*') continue;
      cdot++;
      for (int k = 0; k < 4; k++) {
        int nx = i + dx[k];
        int ny = j + dy[k];
        if (valid(nx, ny)) {
          c++;
        }
      }
      if (c < 2) {
        not_ans = false;
      }
      if (c == 1) {
        q.push(make_pair(i, j));
      }
      deg[i][j] = c;
    }
  }
  if (not_ans && cdot) {
    cout << "Not unique";
    return;
  }
  while (!q.empty()) {
    pair<int, int> temp = q.front();
    q.pop();
    int x = temp.first;
    int y = temp.second;
    for (int i = 0; i < 4; i++) {
      int nx = x + dx[i];
      int ny = y + dy[i];
      if (valid(nx, ny)) {
        if (i == 2) {
          s[x][y] = 'v';
          s[nx][ny] = '^';
        }
        if (i == 3) {
          s[x][y] = '^';
          s[nx][ny] = 'v';
        }
        if (i == 1) {
          s[x][y] = '>';
          s[nx][ny] = '<';
        }
        if (i == 0) {
          s[x][y] = '<';
          s[nx][ny] = '>';
        }
        deg[nx][ny] = 0;
        deg[x][y] = 0;
        x = nx;
        y = ny;
        break;
      }
    }
    for (int i = 0; i < 4; i++) {
      int nx = x + dx[i];
      int ny = y + dy[i];
      if (valid(nx, ny)) {
        deg[nx][ny]--;
        if (deg[nx][ny] == 1) q.push(make_pair(nx, ny));
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '.') {
        cout << "Not unique";
        return;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << s[i][j];
    }
    cout << endl;
  }
}
int main() {
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
