#include <bits/stdc++.h>
using namespace std;
int n;
int m;
char s[2010][2010];
int r[2010][2010];
int dirx[] = {1, 0, -1, 0};
int diry[] = {0, 1, 0, -1};
int tot;
int vis[2010][2010];
typedef struct {
  int x;
  int y;
} PP;
int calr(int x, int y) {
  r[x][y] = 0;
  int dir;
  if (s[x][y] != '.') return -1;
  int i;
  int nx, ny;
  for (i = 0; i < 4; i++) {
    nx = x + dirx[i];
    ny = y + diry[i];
    if (s[nx][ny] == '.') {
      r[x][y]++;
      dir = i;
    }
  }
  return dir;
}
void ini() {
  int i, j;
  memset(r, 0, sizeof(r));
  memset(vis, 0, sizeof(vis));
  for (i = 0; i <= n + 1; i++) {
    for (j = 0; j <= m + 1; j++) {
      s[i][j] = 0;
    }
  }
  for (i = 1; i <= n; i++) {
    scanf("%s", s[i] + 1);
  }
  tot = 0;
}
void solve() {
  queue<PP> q;
  int i, j;
  PP te, nt, ntt;
  int dir;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      if (s[i][j] == '*') {
        tot++;
        vis[i][j] = 1;
        continue;
      }
      calr(i, j);
      te.x = i;
      te.y = j;
      if (r[i][j] == 1) {
        q.push(te);
        vis[te.x][te.y] = -1;
      }
    }
  }
  while (q.size() >= 1) {
    te = q.front();
    q.pop();
    dir = calr(te.x, te.y);
    if (r[te.x][te.y] != 1) continue;
    nt.x = te.x + dirx[dir];
    nt.y = te.y + diry[dir];
    tot += 2;
    if (dir == 0) {
      s[te.x][te.y] = '^';
      s[nt.x][nt.y] = 'v';
    } else if (dir == 2) {
      s[te.x][te.y] = 'v';
      s[nt.x][nt.y] = '^';
    } else if (dir == 1) {
      s[te.x][te.y] = '<';
      s[nt.x][nt.y] = '>';
    } else if (dir == 3) {
      s[te.x][te.y] = '>';
      s[nt.x][nt.y] = '<';
    }
    for (j = 0; j < 4; j++) {
      ntt.x = nt.x + dirx[j];
      ntt.y = nt.y + diry[j];
      calr(ntt.x, ntt.y);
      if (r[ntt.x][ntt.y] == 1 && vis[ntt.x][ntt.y] != -1) {
        q.push(ntt);
        vis[ntt.x][ntt.y] = -1;
      }
    }
  }
}
void out() {
  if (tot != n * m) {
    printf("Not unique\n");
  } else {
    int i;
    for (i = 1; i <= n; i++) {
      printf("%s\n", s[i] + 1);
    }
  }
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    ini();
    solve();
    out();
  }
  return 0;
}
