#include <bits/stdc++.h>
using namespace std;
const int maxn = 2007;
const int inf = 2e9 + 7;
int n, m;
char s[maxn][maxn];
int du[maxn][maxn];
int dx[4] = {0, 0, -1, 1};
int dy[4] = {1, -1, 0, 0};
queue<pair<int, int> > q;
void caldu(int k, int l) {
  if (s[k][l] != '.') return;
  for (int i = 0; i < 4; i++) {
    int nx = k + dx[i], ny = l + dy[i];
    if (s[nx][ny] == '.') du[k][l]++;
  }
}
void upddu(int k, int l) {
  for (int i = 0; i < 4; i++) {
    int nx = k + dx[i], ny = l + dy[i];
    if (s[nx][ny] == '.') du[nx][ny]--;
    if (du[nx][ny] == 1) q.push(pair<int, int>(nx, ny));
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%s", s[i] + 1);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      caldu(i, j);
      if (du[i][j] == 1) q.push(pair<int, int>(i, j));
    }
  }
  while (!q.empty()) {
    pair<int, int> now = q.front();
    q.pop();
    int k = now.first, l = now.second;
    if (s[k][l] != '.' || du[k][l] != 1) continue;
    for (int i = 0; i < 4; i++) {
      int nx = k + dx[i], ny = l + dy[i];
      if (s[nx][ny] == '.') {
        switch (i) {
          case 0:
            s[k][l] = '<';
            s[nx][ny] = '>';
            break;
          case 1:
            s[k][l] = '>';
            s[nx][ny] = '<';
            break;
          case 2:
            s[k][l] = 'v';
            s[nx][ny] = '^';
            break;
          case 3:
            s[k][l] = '^';
            s[nx][ny] = 'v';
            break;
        }
        du[k][l] = 0;
        du[nx][ny] = 0;
        upddu(nx, ny);
        break;
      }
    }
  }
  bool suc = true;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '.') {
        suc = false;
        break;
      }
    }
  }
  if (suc) {
    for (int i = 1; i <= n; i++) {
      printf("%s\n", s[i] + 1);
    }
  } else {
    printf("Not unique\n");
  }
  return 0;
}
