#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
template <class T>
inline bool read(T& n) {
  T x = 0, tmp = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-' && c != EOF) c = getchar();
  if (c == EOF) return false;
  if (c == '-') c = getchar(), tmp = -1;
  while (c >= '0' && c <= '9') x *= 10, x += (c - '0'), c = getchar();
  n = x * tmp;
  return true;
}
template <class T>
inline void write(T n) {
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  int len = 0, data[20];
  while (n) {
    data[len++] = n % 10;
    n /= 10;
  }
  if (!len) data[len++] = 0;
  while (len--) putchar(data[len] + 48);
}
const int MAXN = 2010;
const int dir[4][2] = {0, 1, 0, -1, 1, 0, -1, 0};
const char s[4] = {'<', '>', '^', 'v'};
struct Node {
  int x, y;
  Node(const int& x = 0, const int& y = 0) : x(x), y(y) {}
};
char ma[MAXN][MAXN];
int ret, n, m;
bool in(int x, int y) { return x >= 0 && x < n && y >= 0 && y < m; }
bool corner(int x, int y) {
  int num = 0;
  for (int i = 0; i < 4; i++) {
    int xx = x + dir[i][0];
    int yy = y + dir[i][1];
    if (in(xx, yy) && ma[xx][yy] == '.') num++;
  }
  if (num == 1) return true;
  return false;
}
Node fill(int x, int y) {
  for (int i = 0; i < 4; i++) {
    int xx = x + dir[i][0], yy = y + dir[i][1];
    if (in(xx, yy) && ma[xx][yy] == '.') {
      ma[x][y] = s[i];
      ma[xx][yy] = s[i ^ 1];
      return Node(xx, yy);
    }
  }
  return Node(-1, -1);
}
bool bfs() {
  queue<Node> q;
  ret = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (ma[i][j] == '.') {
        if (corner(i, j)) q.push(Node(i, j));
        ret++;
      }
  while (!q.empty()) {
    Node now = q.front();
    q.pop();
    if (ma[now.x][now.y] != '.') continue;
    now = fill(now.x, now.y);
    ret -= 2;
    for (int i = 0; i < 4; i++) {
      int xx = now.x + dir[i][0];
      int yy = now.y + dir[i][1];
      if (in(xx, yy) && ma[xx][yy] == '.' && corner(xx, yy))
        q.push(Node(xx, yy));
    }
  }
  return ret == 0;
}
int main() {
  read(n), read(m);
  for (int i = 0; i < n; i++) scanf("%s", ma[i]);
  if (bfs())
    for (int i = 0; i < n; i++) printf("%s\n", ma[i]);
  else
    puts("Not unique");
  return 0;
}
