#include <bits/stdc++.h>
int const MAX = 2005;
char s[MAX][MAX];
int n, m, cnt;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
void dfs(int x, int y) {
  if (x < 1 || x > n || y < 1 || y > m || s[x][y] != '.') return;
  int dir = -1, sum = 0, xx, yy;
  for (int i = 0; i < 4; i++) {
    xx = x + dx[i];
    yy = y + dy[i];
    if (s[xx][yy] == '.') {
      sum++;
      dir = i;
    }
  }
  if (sum == 1) {
    if (dir == 0) {
      s[x][y] = '<';
      s[x][y + 1] = '>';
    } else if (dir == 1) {
      s[x][y] = '>';
      s[x][y - 1] = '<';
    } else if (dir == 2) {
      s[x][y] = '^';
      s[x + 1][y] = 'v';
    } else if (dir == 3) {
      s[x][y] = 'v';
      s[x - 1][y] = '^';
    }
    cnt += 2;
    for (int i = 0; i < 4; i++) dfs(x + dx[dir] + dx[i], y + dy[dir] + dy[i]);
  }
}
int main() {
  cnt = 0;
  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++)
      if (s[i][j] == '*') cnt++;
  if ((n * m - cnt) % 2 != 0) {
    printf("Not unique\n");
    return 0;
  }
  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++) printf("%s\n", s[i] + 1);
  else
    printf("Not unique\n");
  return 0;
}
