#include <bits/stdc++.h>
using namespace std;
struct tacka {
  int x, y;
};
int nizx[] = {-1, 1, 0, 0};
int nizy[] = {0, 0, 1, -1};
int n, m;
char c[2001][2001];
bool used[2001][2001];
int kor = 0;
int a[2001][2001];
stack<tacka> s;
bool pp(int y, int x) {
  if (x < m && x >= 0 && y < n && y >= 0) return true;
  return false;
}
void sredi(int i, int j) {
  for (int ii = 0; ii < 4; ii++)
    if (pp(i + nizy[ii], j + nizx[ii])) a[i + nizy[ii]][j + nizx[ii]]--;
  for (int ii = 0; ii < 4; ii++) {
    if (pp(i + nizy[ii], j + nizx[ii])) {
      tacka t;
      t.y = i + nizy[ii];
      t.x = j + nizx[ii];
      if (a[i + nizy[ii]][j + nizx[ii]] == 1 &&
          used[i + nizy[ii]][j + nizx[ii]] == false) {
        used[i + nizy[ii]][j + nizx[ii]] = true;
        s.push(t);
      }
    }
  }
}
void radi() {
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (c[i][j] == '*') {
        a[i][j] = -1;
        used[i][j] = true;
        kor++;
      } else {
        if (pp(i + 1, j) && c[i + 1][j] == '.') a[i][j]++;
        if (pp(i - 1, j) && c[i - 1][j] == '.') a[i][j]++;
        if (pp(i, j + 1) && c[i][j + 1] == '.') a[i][j]++;
        if (pp(i, j - 1) && c[i][j - 1] == '.') a[i][j]++;
      }
    }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 1) {
        used[i][j] = true;
        tacka t;
        t.x = j;
        t.y = i;
        s.push(t);
      }
    }
  }
  while (!s.empty()) {
    tacka t;
    t = s.top();
    s.pop();
    int i = t.y, j = t.x;
    if (c[i][j] == '.') {
      if (pp(i + 1, j) && c[i + 1][j] == '.') {
        c[i][j] = '^';
        c[i + 1][j] = 'v';
        used[i + 1][j] = true;
        sredi(i + 1, j);
      }
      if (pp(i - 1, j) && c[i - 1][j] == '.') {
        c[i][j] = 'v';
        c[i - 1][j] = '^';
        used[i - 1][j] = true;
        sredi(i - 1, j);
      }
      if (pp(i, j + 1) && c[i][j + 1] == '.') {
        c[i][j] = '<';
        c[i][j + 1] = '>';
        used[i][j + 1] = true;
        sredi(i, j + 1);
      }
      if (pp(i, j - 1) && c[i][j - 1] == '.') {
        c[i][j] = '>';
        c[i][j - 1] = '<';
        used[i][j - 1] = true;
        sredi(i, j - 1);
      }
    }
  }
  int pok = 1;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (c[i][j] == '.') pok = 0;
  if (pok == 0)
    printf("Not unique\n");
  else {
    for (int i = 0; i < n; i++) printf("%s\n", c[i]);
  }
}
int main() {
  scanf("%i%i", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", &c[i]);
  radi();
  return 0;
}
