#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
int n, m;
char M[N][N];
int deg[N][N];
const int dx[] = {0, 0, -1, 1};
const int dy[] = {1, -1, 0, 0};
void load() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", M + i);
}
queue<int> Q;
inline bool ok(int x, int y) {
  if (x >= 0 && x < n && y >= 0 && y < m && M[x][y] == '.') return true;
  return false;
}
void update(int x, int y) {
  deg[x][y]--;
  for (int i = 0; i < 4; i++) {
    int X = x + dx[i];
    int Y = y + dy[i];
    if (ok(X, Y)) {
      deg[X][Y]--;
      if (deg[X][Y] == 1) Q.push(X), Q.push(Y);
    }
  }
}
void solve() {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (M[i][j] == '*') continue;
      for (int k = 0; k < 4; k++) {
        int X = i + dx[k];
        int Y = j + dy[k];
        if (ok(X, Y)) deg[i][j]++;
      }
      if (deg[i][j] == 1) Q.push(i), Q.push(j);
    }
  }
  while (!Q.empty()) {
    int x = Q.front();
    Q.pop();
    int y = Q.front();
    Q.pop();
    for (int i = 0; i < 4; i++) {
      int X = x + dx[i];
      int Y = y + dy[i];
      if (ok(X, Y)) {
        if (x == X) {
          M[x][min(Y, y)] = '<';
          M[x][max(Y, y)] = '>';
        } else {
          M[min(X, x)][y] = '^';
          M[max(X, x)][y] = 'v';
        }
        update(X, Y);
        update(x, y);
        break;
      }
    }
  }
  bool da = true;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (M[i][j] == '.') da = false;
    }
  }
  if (!da)
    printf("Not unique\n");
  else {
    for (int i = 0; i < n; i++) printf("%s\n", M[i]);
  }
}
int main(void) {
  load();
  solve();
  return 0;
}
