#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
int n, m, cnt;
char a[N][N];
int iq[N][N];
queue<pair<int, int> > Q;
void Push(int x, int y) {
  if (iq[x][y]) return;
  iq[x][y] = 1;
  Q.push(make_pair(x, y));
}
int Can(int x, int y) {
  if (a[x][y] != '.') return 0;
  int c = 0;
  c += a[x - 1][y] == '.';
  c += a[x + 1][y] == '.';
  c += a[x][y - 1] == '.';
  c += a[x][y + 1] == '.';
  return c == 1;
}
void Move(int x, int y) {
  if (x > 1 && Can(x - 1, y)) Push(x - 1, y);
  if (x < n && Can(x + 1, y)) Push(x + 1, y);
  if (y > 1 && Can(x, y - 1)) Push(x, y - 1);
  if (y < m && Can(x, y + 1)) Push(x, y + 1);
}
void Fill(int x, int y) {
  if (a[x - 1][y] == '.') {
    a[x][y] = 'v';
    a[x - 1][y] = '^';
    --cnt;
    Move(x, y);
    Move(x - 1, y);
  }
  if (a[x + 1][y] == '.') {
    a[x][y] = '^';
    a[x + 1][y] = 'v';
    --cnt;
    Move(x, y);
    Move(x + 1, y);
  }
  if (a[x][y - 1] == '.') {
    a[x][y] = '>';
    a[x][y - 1] = '<';
    --cnt;
    Move(x, y);
    Move(x, y - 1);
  }
  if (a[x][y + 1] == '.') {
    a[x][y] = '<';
    a[x][y + 1] = '>';
    --cnt;
    Move(x, y);
    Move(x, y + 1);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%s", a[i] + 1);
    for (int j = 1; j <= m; ++j) {
      if (a[i][j] == '.') ++cnt;
    }
  }
  if (cnt & 1) {
    puts("Not unique");
    return 0;
  }
  cnt /= 2;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (a[i][j] != '.') continue;
      if (Can(i, j)) Push(i, j);
    }
  }
  for (; !Q.empty();) {
    int x = Q.front().first, y = Q.front().second;
    Q.pop();
    if (a[x][y] != '.') continue;
    if (!Can(x, y)) {
      puts("Not unique");
      return 0;
    }
    Fill(x, y);
  }
  if (cnt != 0) {
    puts("Not unique");
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    printf("%s\n", a[i] + 1);
  }
  return 0;
}
