#include <bits/stdc++.h>
using namespace std;
char T[2010][2010];
int deg[2010][2010];
int dir[2010][2010];
int n, m, n_mtch;
vector<pair<int, int> > qu;
inline int is_good(int x, int y) {
  return (((0 <= (x)) && ((x) < (n)) && (0 <= (y)) && ((y) < (m))) &&
          (T[x][y] != '*'));
}
inline int dec(int x, int y) {
  if (((0 <= (x)) && ((x) < (n)) && (0 <= (y)) && ((y) < (m))))
    deg[x][y] -= deg[x][y] != 0;
  if (deg[x][y] == 1) qu.push_back(pair<int, int>(x, y));
  return 0;
}
int check_all(int x, int y, int (*f)(int, int)) {
  return f(x + 1, y) + f(x, y + 1) + f(x - 1, y) + f(x, y - 1);
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i) scanf("%s", T[i]);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      deg[i][j] = T[i][j] != '*' ? check_all(i, j, is_good) : 0;
      if (deg[i][j] == 1) qu.push_back(pair<int, int>(i, j));
      if (T[i][j] == '*') ++n_mtch;
    }
  }
  int mtch = 0;
  while (qu.size()) {
    pair<int, int> node = qu.back();
    qu.pop_back();
    int x = node.first, y = node.second;
    if (!deg[x][y]) continue;
    int d = -1;
    mtch += 2;
    if (((0 <= (x + 1)) && ((x + 1) < (n)) && (0 <= (y)) && ((y) < (m))) &&
        deg[x + 1][y]) {
      check_all(x, y, dec);
      check_all(x + 1, y, dec);
      deg[x][y] = deg[x + 1][y] = 0;
      T[x][y] = '^';
      T[x + 1][y] = 'v';
    }
    if (((0 <= (x - 1)) && ((x - 1) < (n)) && (0 <= (y)) && ((y) < (m))) &&
        deg[x - 1][y]) {
      check_all(x, y, dec);
      check_all(x - 1, y, dec);
      deg[x][y] = deg[x - 1][y] = 0;
      T[x][y] = 'v';
      T[x - 1][y] = '^';
    }
    if (((0 <= (x)) && ((x) < (n)) && (0 <= (y + 1)) && ((y + 1) < (m))) &&
        deg[x][y + 1]) {
      check_all(x, y, dec);
      check_all(x, y + 1, dec);
      deg[x][y] = deg[x][y + 1] = 0;
      T[x][y] = '<';
      T[x][y + 1] = '>';
    }
    if (((0 <= (x)) && ((x) < (n)) && (0 <= (y - 1)) && ((y - 1) < (m))) &&
        deg[x][y - 1]) {
      check_all(x, y, dec);
      check_all(x, y - 1, dec);
      deg[x][y] = deg[x][y - 1] = 0;
      T[x][y] = '>';
      T[x][y - 1] = '<';
    }
  }
  if (n_mtch + mtch == n * m)
    for (int i = 0; i < n; ++i) printf("%s\n", T[i]);
  else
    puts("Not unique");
}
