#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, -1, 0, 1};
const char a[] = {'^', '>', 'v', '<'};
const char b[] = {'v', '<', '^', '>'};
int in[MAXN][MAXN];
bool matched[MAXN][MAXN];
char grid[MAXN][MAXN];
int n, m;
void fast_io() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
}
bool ok(int nr, int nc) {
  bool can_r = (nr >= 0 and nr < n);
  bool can_c = (nc >= 0 and nc < m);
  return can_r and can_c;
}
bool can_match(int nr, int nc) {
  return ok(nr, nc) and !matched[nr][nc] and grid[nr][nc] == '.';
}
void clear(int i, int j, queue<pair<int, int> > &q) {
  for (int k = 0; k < 4; k++) {
    int nr = i + dy[k], nc = j + dx[k];
    if (!can_match(nr, nc)) continue;
    if (--in[nr][nc] == 1) q.push(make_pair(nr, nc));
  }
}
bool solve(int n, int m) {
  queue<pair<int, int> > q;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++)
      if (in[i][j] == 1) q.push(make_pair(i, j));
  }
  while (!q.empty()) {
    pair<int, int> u = q.front();
    q.pop();
    if (matched[u.first][u.second]) continue;
    matched[u.first][u.second] = 1;
    pair<int, int> to = make_pair(-1, -1);
    for (int i = 0; i < 4; i++) {
      int nr = u.first + dy[i], nc = u.second + dx[i];
      if (!can_match(nr, nc)) continue;
      grid[u.first][u.second] = a[i];
      grid[nr][nc] = b[i];
      matched[nr][nc] = 1, to = make_pair(nr, nc);
    }
    clear(u.first, u.second, q);
    clear(to.first, to.second, q);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++)
      if (grid[i][j] == '.') return 0;
  }
  return 1;
}
int main() {
  fast_io();
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> grid[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (grid[i][j] != '.') continue;
      for (int k = 0; k < 4; k++) {
        int nr = i + dy[k], nc = j + dx[k];
        if (!ok(nr, nc) | grid[nr][nc] != '.') continue;
        ++in[nr][nc];
      }
    }
  }
  if (!solve(n, m)) {
    printf("Not unique\n");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%c", grid[i][j]);
    printf("\n");
  }
  return 0;
}
