#include <bits/stdc++.h>
using namespace std;
const int MAX = 2005;
pair<int, int> q[MAX * MAX];
char a[MAX][MAX];
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, 1, 0, -1};
char tt[4] = {'v', '<', '^', '>'};
int n, m;
bool isav(int x, int y) {
  return (0 <= x && x < n && 0 <= y && y < m && a[x][y] == '.');
}
int deg(int x, int y) {
  int ans = 0;
  for (int i = 0; i < 4; i++) {
    int nx = x + dx[i];
    int ny = y + dy[i];
    if (isav(nx, ny)) ans++;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> a[i][j];
  int h = 0, t = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (isav(i, j) && deg(i, j) == 1) q[t++] = make_pair(i, j);
  while (h < t) {
    int x = q[h].first, y = q[h].second;
    h++;
    for (int i = 0; i < 4; i++) {
      int nx = x + dx[i];
      int ny = y + dy[i];
      if (isav(nx, ny)) {
        a[x][y] = tt[i];
        a[nx][ny] = tt[i ^ 2];
        for (int j = 0; j < 4; j++) {
          int nnx = nx + dx[j];
          int nny = ny + dy[j];
          if (isav(nnx, nny) && deg(nnx, nny) == 1)
            q[t++] = make_pair(nnx, nny);
        }
        break;
      }
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (a[i][j] == '.') {
        cout << "Not unique" << endl;
        return 0;
      }
  for (int i = 0; i < n; i++, cout << endl)
    for (int j = 0; j < m; j++) cout << a[i][j];
  return 0;
}
