#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
const int dx[4] = {1, -1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
char s[maxn][maxn];
int vis[maxn][maxn], q[maxn * maxn][3];
int n, m, l, r, x, y, k, xx, yy;
void judge(int x, int y) {
  if (x < 1 || x > n || y < 1 || y > m) return;
  if (s[x][y] != '.' || vis[x][y] >= 8) return;
  for (int i = (0); i <= int(3); i++) {
    if (s[x + dx[i]][y + dy[i]] != '.') continue;
    int flag = 0;
    for (int j = (0); j <= int(3); j++)
      if (i != j && s[x + dx[j]][y + dy[j]] == '.') flag = 1;
    if (flag) continue;
    if (i == 0) s[x][y] = '^', s[x + 1][y] = 'v';
    if (i == 1) s[x][y] = 'v', s[x - 1][y] = '^';
    if (i == 2) s[x][y] = '>', s[x][y - 1] = '<';
    if (i == 3) s[x][y] = '<', s[x][y + 1] = '>';
    q[r][0] = x;
    q[r][1] = y;
    q[r++][2] = i;
    vis[x][y] = 8;
    vis[x + dx[i]][y + dy[i]] = 1;
  }
  vis[x][y]++;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = (1); i <= int(n); i++) scanf("%s", s[i] + 1);
  for (int i = (1); i <= int(n); i++)
    for (int j = (1); j <= int(m); j++) judge(i, j);
  while (l < r) {
    x = q[l][0];
    y = q[l][1];
    k = q[l++][2];
    for (int i = (0); i <= int(3); i++) judge(x + dx[i], y + dy[i]);
    x += dx[k];
    y += dy[k];
    for (int i = (0); i <= int(3); i++) judge(x + dx[i], y + dy[i]);
  }
  for (int i = (1); i <= int(n); i++)
    for (int j = (1); j <= int(m); j++)
      if (s[i][j] == '.') return puts("Not unique"), 0;
  for (int i = (1); i <= int(n); i++) printf("%s\n", s[i] + 1);
  return 0;
}
