#include <bits/stdc++.h>
using namespace std;
const int dir_x[4] = {-1, 0, 1, 0};
const int dir_y[4] = {0, 1, 0, -1};
char S[2005][2005];
struct L_node {
  int x, y;
  L_node() { x = y = 0; }
  L_node(int x1, int y1) { x = x1, y = y1; }
} L[2005 * 2005];
int H, T, n, m;
int calcu(int x, int y) {
  int res = 0;
  if (x > 0 && S[x - 1][y] == '.') res++;
  if (x < n - 1 && S[x + 1][y] == '.') res++;
  if (y > 0 && S[x][y - 1] == '.') res++;
  if (y < m - 1 && S[x][y + 1] == '.') res++;
  return res;
}
L_node Printxy(int x, int y) {
  if (x > 0 && S[x - 1][y] == '.') {
    S[x - 1][y] = '^';
    S[x][y] = 'v';
    return L_node(x - 1, y);
  }
  if (x < n - 1 && S[x + 1][y] == '.') {
    S[x][y] = '^';
    S[x + 1][y] = 'v';
    return L_node(x + 1, y);
  }
  if (y > 0 && S[x][y - 1] == '.') {
    S[x][y] = '>';
    S[x][y - 1] = '<';
    return L_node(x, y - 1);
  }
  if (y < m - 1 && S[x][y + 1] == '.') {
    S[x][y] = '<';
    S[x][y + 1] = '>';
    return L_node(x, y + 1);
  }
  return L_node(-1, -1);
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      scanf("%c", &S[i][j]);
      while (S[i][j] != '*' && S[i][j] != '.') scanf("%c", &S[i][j]);
    }
  H = 0;
  T = -1;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (S[i][j] == '.' && calcu(i, j) == 1) L[++T] = L_node(i, j);
  while (H <= T) {
    int tx = L[H].x, ty = L[H].y;
    H++;
    if (S[tx][ty] != '.') continue;
    if (S[tx][ty] == '.' && calcu(tx, ty) == 0) {
      cout << "Not unique" << endl;
      return 0;
    }
    L_node tt = Printxy(tx, ty);
    for (int i = 0; i < 4; i++) {
      if (tx + dir_x[i] >= 0 && tx + dir_x[i] < n)
        if (ty + dir_y[i] >= 0 && ty + dir_y[i] < m)
          if (S[tx + dir_x[i]][ty + dir_y[i]] == '.' &&
              calcu(tx + dir_x[i], ty + dir_y[i]) == 1)
            L[++T] = L_node(tx + dir_x[i], ty + dir_y[i]);
    }
    tx = tt.x, ty = tt.y;
    for (int i = 0; i < 4; i++) {
      if (tx + dir_x[i] >= 0 && tx + dir_x[i] < n)
        if (ty + dir_y[i] >= 0 && ty + dir_y[i] < m)
          if (S[tx + dir_x[i]][ty + dir_y[i]] == '.' &&
              calcu(tx + dir_x[i], ty + dir_y[i]) == 1)
            L[++T] = L_node(tx + dir_x[i], ty + dir_y[i]);
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (S[i][j] == '.') {
        cout << "Not unique" << endl;
        return 0;
      }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%c", S[i][j]);
    cout << endl;
  }
  return 0;
}
