#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 5;
int n, m, deg[maxn][maxn];
char mat[maxn][maxn];
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
queue<pair<int, int> > barg;
bool isval(int x, int y) {
  if (x >= 0 && x < n && y >= 0 && y < m) return true;
  return false;
}
void daraje(int x, int y) {
  for (int i = 0; i < 4; i++) {
    int nx = dx[i] + x;
    int ny = dy[i] + y;
    if (isval(nx, ny)) {
      if (mat[nx][ny] == '.') deg[x][y]++;
    }
  }
}
void dar(int x, int y) {
  for (int i = 0; i < 4; i++) {
    int nx = dx[i] + x;
    int ny = dy[i] + y;
    if (isval(nx, ny)) {
      if (mat[nx][ny] == '.') {
        deg[nx][ny]--;
        if (deg[nx][ny] == 1) barg.push(make_pair(nx, ny));
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < m; j++) mat[i][j] = s[j];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (mat[i][j] == '.') daraje(i, j);
      if (deg[i][j] == 1) barg.push(make_pair(i, j));
    }
  }
  while (barg.size()) {
    int x = barg.front().first;
    int y = barg.front().second;
    barg.pop();
    for (int i = 0; i < 4; i++) {
      int nx = x + dx[i];
      int ny = y + dy[i];
      if (isval(nx, ny)) {
        if (mat[nx][ny] == '.') {
          dar(nx, ny);
          if (i == 0) mat[x][y] = '<', mat[nx][ny] = '>';
          if (i == 1) mat[x][y] = '^', mat[nx][ny] = 'v';
          if (i == 2) mat[x][y] = '>', mat[nx][ny] = '<';
          if (i == 3) mat[x][y] = 'v', mat[nx][ny] = '^';
          deg[x][y] = 0;
          deg[nx][ny] = 0;
        }
      }
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (mat[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << mat[i][j];
    cout << "\n";
  }
}
