#include <bits/stdc++.h>
using namespace std;
struct Pos {
  int x;
  int y;
  Pos(int x, int y) {
    this->x = x;
    this->y = y;
  }
};
const int N = 2010;
char see[N][N];
int view[N][N];
queue<Pos> que;
int n, m;
int tot;
int input() {
  if (scanf("%d%d", &n, &m) == EOF) return 0;
  for (int i = 0; i < n; i++) {
    getchar();
    for (int j = 0; j < m; j++) scanf("%c", see[i] + j);
  }
  return 1;
}
int isin(int x, int y) {
  if (x < 0 || x >= n || y < 0 || y >= m)
    return 0;
  else
    return 1;
}
int isok(int x, int y) {
  if (!isin(x, y))
    return 0;
  else if (see[x][y] != '.')
    return 0;
  else
    return 1;
}
int make() {
  memset(view, 0, sizeof(view));
  while (!que.empty()) que.pop();
  tot = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (isok(i, j)) {
        tot++;
        int sum = 0;
        sum += isok(i - 1, j);
        sum += isok(i + 1, j);
        sum += isok(i, j - 1);
        sum += isok(i, j + 1);
        view[i][j] = sum;
        if (sum == 1) que.push(Pos(i, j));
      }
  return 0;
}
int dec(int x, int y) {
  if (isin(x, y)) view[x][y] = 0;
  if (isok(x - 1, y))
    if (--view[x - 1][y] == 1) que.push(Pos(x - 1, y));
  if (isok(x + 1, y))
    if (--view[x + 1][y] == 1) que.push(Pos(x + 1, y));
  if (isok(x, y - 1))
    if (--view[x][y - 1] == 1) que.push(Pos(x, y - 1));
  if (isok(x, y + 1))
    if (--view[x][y + 1] == 1) que.push(Pos(x, y + 1));
  return 0;
}
int fill(int x, int y) {
  if (isok(x, y)) {
    if (isok(x - 1, y)) {
      see[x - 1][y] = '^';
      see[x][y] = 'v';
      dec(x - 1, y);
    } else if (isok(x + 1, y)) {
      see[x][y] = '^';
      see[x + 1][y] = 'v';
      dec(x + 1, y);
    } else if (isok(x, y - 1)) {
      see[x][y - 1] = '<';
      see[x][y] = '>';
      dec(x, y - 1);
    } else if (isok(x, y + 1)) {
      see[x][y] = '<';
      see[x][y + 1] = '>';
      dec(x, y + 1);
    } else
      return 0;
    return 1;
  } else
    return 2;
}
int print() {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%c", see[i][j]);
    printf("\n");
  }
  return 0;
}
int run() {
  if (!input()) return 0;
  make();
  int all = 0;
  while (!que.empty()) {
    Pos p = que.front();
    que.pop();
    int ret = fill(p.x, p.y);
    if (ret == 1)
      all += 2;
    else if (ret == 0)
      break;
  }
  if (all == tot)
    print();
  else
    printf("Not unique\n");
  return 1;
}
int main() {
  while (run())
    ;
  return 0;
}
