#include <bits/stdc++.h>
using namespace std;
int n, m;
int grid[2020][2020];
char r[2020][2020];
bool vis[2020][2020];
queue<pair<int, int> > q;
int getNumberNei(int i, int j) {
  int ret = 0;
  if (!vis[i + 1][j]) ret += grid[i + 1][j];
  if (!vis[i - 1][j]) ret += grid[i - 1][j];
  if (!vis[i][j + 1]) ret += grid[i][j + 1];
  if (!vis[i][j - 1]) ret += grid[i][j - 1];
  return ret;
}
void getNei(int i, int j) {
  pair<int, int> aux;
  if (!vis[i + 1][j] && grid[i + 1][j] == 1) {
    r[i][j] = '^';
    r[i + 1][j] = 'v';
    aux = make_pair(i + 1, j);
  } else if (!vis[i - 1][j] && grid[i - 1][j] == 1) {
    r[i - 1][j] = '^';
    r[i][j] = 'v';
    aux = make_pair(i - 1, j);
  } else if (!vis[i][j + 1] && grid[i][j + 1] == 1) {
    r[i][j] = '<';
    r[i][j + 1] = '>';
    aux = make_pair(i, j + 1);
  } else {
    r[i][j - 1] = '<';
    r[i][j] = '>';
    aux = make_pair(i, j - 1);
  }
  i = aux.first;
  j = aux.second;
  vis[i][j] = true;
  if (!vis[i + 1][j] && getNumberNei(i + 1, j) == 1 && grid[i + 1][j] == 1)
    q.push(make_pair(i + 1, j));
  if (!vis[i - 1][j] && getNumberNei(i - 1, j) == 1 && grid[i - 1][j] == 1)
    q.push(make_pair(i - 1, j));
  if (!vis[i][j + 1] && getNumberNei(i, j + 1) == 1 && grid[i][j + 1] == 1)
    q.push(make_pair(i, j + 1));
  if (!vis[i][j - 1] && getNumberNei(i, j - 1) == 1 && grid[i][j - 1] == 1)
    q.push(make_pair(i, j - 1));
}
bool bfs() {
  while (!q.empty()) {
    pair<int, int> v = q.front();
    q.pop();
    if (vis[v.first][v.second]) continue;
    vis[v.first][v.second] = true;
    if (getNumberNei(v.first, v.second) == 0) return false;
    getNei(v.first, v.second);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (grid[i][j] == 0)
        r[i][j] = '*';
      else if (!vis[i][j])
        return false;
    }
  }
  return true;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      char c;
      scanf(" %c", &c);
      if (c == '.') {
        grid[i][j] = 1;
      } else
        grid[i][j] = 0;
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (grid[i][j] == 1 && getNumberNei(i, j) == 1) q.push(make_pair(i, j));
    }
  }
  if (!bfs())
    printf("Not unique\n");
  else {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        printf("%c", r[i][j]);
      }
      cout << endl;
    }
  }
  return 0;
}
