#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const double E = exp(1);
const double EPS = 1e-5;
const int maxn = 2000 + 5;
int n, m;
char mp[maxn][maxn] = {0};
int dx[] = {1, 0, 0, -1};
int dy[] = {0, 1, -1, 0};
int cnt = 0;
bool check(int x, int y) {
  if (x < 0 || x >= m || y < 0 || y >= n || mp[x][y] != '.') return false;
  return true;
}
void dfs(int x, int y) {
  if (!check(x, y)) return;
  int num = 0;
  int dir;
  for (int i = 0; i < (4); i++) {
    int xx = x + dx[i];
    int yy = y + dy[i];
    if (check(xx, yy)) {
      dir = i;
      num++;
    }
  }
  if (num == 1) {
    if (dir == 0) {
      mp[x][y] = '^';
      mp[x + dx[dir]][y + dy[dir]] = 'v';
    } else if (dir == 1) {
      mp[x][y] = '<';
      mp[x + dx[dir]][y + dy[dir]] = '>';
    } else if (dir == 2) {
      mp[x][y] = '>';
      mp[x + dx[dir]][y + dy[dir]] = '<';
    } else if (dir == 3) {
      mp[x][y] = 'v';
      mp[x + dx[dir]][y + dy[dir]] = '^';
    }
    cnt += 2;
    for (int i = 0; i < (4); i++) dfs(x + dx[i] + dx[dir], y + dy[i] + dy[dir]);
  }
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> m >> n;
  for (int i = 0; i < (m); i++) cin >> mp[i];
  for (int i = 0; i < (m); i++)
    for (int j = 0; j < (n); j++) {
      if (mp[i][j] == '*') cnt++;
      dfs(i, j);
    }
  if (cnt != m * n)
    puts("Not unique");
  else
    for (int i = 0; i < (m); i++) cout << mp[i] << endl;
  return 0;
}
