#include <bits/stdc++.h>
using namespace std;
const int M = 2005;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
int n, m, x, y, deg[M][M];
bool vis[M][M];
string s[M];
queue<pair<int, int> > q;
void stuff(int nr, int nc) {
  if (nr < 0 || nc < 0 || nr == n || nc == m || vis[nr][nc] || s[nr][nc] == '*')
    return;
  deg[nr][nc]--;
  if (deg[nr][nc] == 1) q.push(make_pair(nr, nc));
}
void bfs() {
  while (!q.empty()) {
    int x = q.front().first, y = q.front().second;
    q.pop();
    if (vis[x][y]) continue;
    for (int i = 0; i < 4; i++) {
      int nr = x + dx[i];
      int nc = y + dy[i];
      if (nr < 0 || nc < 0 || nr == n || nc == m || vis[nr][nc] ||
          s[nr][nc] == '*')
        continue;
      vis[x][y] = vis[nr][nc] = true;
      if (!i)
        s[x][y] = '^', s[nr][nc] = 'v';
      else if (i == 1)
        s[x][y] = '<', s[nr][nc] = '>';
      else if (i == 2)
        s[x][y] = 'v', s[nr][nc] = '^';
      else
        s[x][y] = '>', s[nr][nc] = '<';
      for (int j = 0; j < 4; j++) stuff(x + dx[j], y + dy[j]);
      for (int j = 0; j < 4; j++) stuff(nr + dx[j], nc + dy[j]);
      break;
    }
    if (!vis[x][y]) {
      cout << "Not unique";
      exit(0);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n >> m;
  bool f = false;
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '*') continue;
      f = true;
      for (int k = 0; k < 4; k++) {
        int nr = i + dx[k];
        int nc = j + dy[k];
        if (nr < 0 || nc < 0 || nr == n || nc == m || s[nr][nc] == '*')
          continue;
        deg[nr][nc]++;
      }
    }
  }
  if (!f) {
    for (int i = 0; i < n; i++) cout << s[i] << endl;
    return 0;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (deg[i][j] == 1) q.push(make_pair(i, j));
  if (q.empty()) return cout << "Not unique", 0;
  bfs();
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (s[i][j] == '.') return cout << "Not unique", 0;
  for (int i = 0; i < n; i++) cout << s[i] << endl;
  return 0;
}
