#include <bits/stdc++.h>
using namespace std;
char a[2020][2020];
int n, m;
int d[2020][2020];
struct Node {
  int x, y;
} q[4000020];
int h = 1, t = 0;
int num = 0;
void pa() {
  for (int i = 1; i <= n; i++) printf("%s\n", a[i] + 1);
}
void pn() { printf("Not unique\n"); }
void change(int x, int y) {
  d[x + 1][y]--;
  if (d[x + 1][y] == 1) q[++t] = {x + 1, y};
  d[x - 1][y]--;
  if (d[x - 1][y] == 1) q[++t] = {x - 1, y};
  d[x][y + 1]--;
  if (d[x][y + 1] == 1) q[++t] = {x, y + 1};
  d[x][y - 1]--;
  if (d[x][y - 1] == 1) q[++t] = {x, y - 1};
}
void bfs() {
  while (h <= t) {
    int x = q[h].x, y = q[h].y;
    h++;
    if (a[x][y] != '.') continue;
    if (d[x][y] == 0) break;
    num -= 2;
    if (a[x + 1][y] == '.') {
      a[x][y] = '^';
      a[x + 1][y] = 'v';
      change(x + 1, y);
    } else if (a[x - 1][y] == '.') {
      a[x][y] = 'v';
      a[x - 1][y] = '^';
      change(x - 1, y);
    } else if (a[x][y + 1] == '.') {
      a[x][y] = '<';
      a[x][y + 1] = '>';
      change(x, y + 1);
    } else {
      a[x][y] = '>';
      a[x][y - 1] = '<';
      change(x, y - 1);
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", a[i] + 1);
  for (int i = 0; i <= n + 1; i++) a[i][0] = -10;
  for (int j = 1; j <= m + 1; j++) a[0][j] = -10;
  for (int i = 1; i <= n + 1; i++)
    for (int j = 1; j <= m + 1; j++) {
      if (a[i][j] == '.') {
        d[i + 1][j]++;
        d[i - 1][j]++;
        d[i][j + 1]++;
        d[i][j - 1]++;
        num++;
      } else {
        d[i][j] = -10;
      }
    }
  if (num == 0) {
    pa();
    return 0;
  }
  if (num & 1) {
    pn();
    return 0;
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (d[i][j] == 1) q[++t] = {i, j};
  bfs();
  if (num == 0)
    pa();
  else
    pn();
  return 0;
}
