#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3fLL;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int maxn = 1e5 + 10;
int n, m;
char mp[2005][2005];
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
int cnt;
void dfs(int x, int y) {
  if (x < 1 || x > n || y < 1 || y > m || mp[x][y] != '.') return;
  int sum = 0, dir = -1;
  for (int i = 0; i < 4; i++) {
    int tx = x + dx[i], ty = y + dy[i];
    if (mp[tx][ty] == '.') {
      sum++;
      dir = i;
    }
  }
  if (sum == 1) {
    if (dir == 0) {
      mp[x][y] = '<';
      mp[x][y + 1] = '>';
    } else if (dir == 1) {
      mp[x][y] = '>';
      mp[x][y - 1] = '<';
    } else if (dir == 2) {
      mp[x][y] = '^';
      mp[x + 1][y] = 'v';
    } else if (dir == 3) {
      mp[x][y] = 'v';
      mp[x - 1][y] = '^';
    }
    cnt += 2;
    int tx = x + dx[dir], ty = y + dy[dir];
    for (int i = 0; i < 4; i++) dfs(tx + dx[i], ty + dy[i]);
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      scanf(" %c", &mp[i][j]);
      if (mp[i][j] == '*') cnt++;
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) dfs(i, j);
  if (cnt == n * m) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) printf("%c", mp[i][j]);
      puts("");
    }
  } else {
    puts("Not unique");
  }
  return 0;
}
