#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<char> red(m);
  vector<int> tmp(m, 0);
  vector<vector<int> > bs(n, tmp);
  vector<vector<char> > mat(n, red);
  queue<pair<int, int> > bfs;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> mat[i][j];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (i > 0 && mat[i - 1][j] == '.') bs[i][j]++;
      if (j > 0 && mat[i][j - 1] == '.') bs[i][j]++;
      if (i < n - 1 && mat[i + 1][j] == '.') bs[i][j]++;
      if (j < m - 1 && mat[i][j + 1] == '.') bs[i][j]++;
      if (bs[i][j] == 1 && mat[i][j] == '.') bfs.push(make_pair(i, j));
    }
  }
  while (!bfs.empty()) {
    int x = bfs.front().first, y = bfs.front().second;
    bfs.pop();
    if (mat[x][y] != '.') continue;
    if (x > 0 && mat[x - 1][y] == '.') {
      mat[x][y] = 'v', mat[x - 1][y] = '^', bs[x][y] = 0;
      if (y > 0) bs[x - 1][y - 1]--;
      if (x - 1 > 0) bs[x - 2][y]--;
      if (y < m - 1) bs[x - 1][y + 1]--;
      if (y > 0 && mat[x - 1][y - 1] == '.' && bs[x - 1][y - 1] == 1)
        bfs.push(make_pair(x - 1, y - 1));
      if (x - 1 > 0 && mat[x - 2][y] == '.' && bs[x - 2][y] == 1)
        bfs.push(make_pair(x - 2, y));
      if (y < m - 1 && mat[x - 1][y + 1] == '.' && bs[x - 1][y + 1] == 1)
        bfs.push(make_pair(x - 1, y + 1));
      continue;
    }
    if (y > 0 && mat[x][y - 1] == '.') {
      mat[x][y] = '>', mat[x][y - 1] = '<', bs[x][y] = 0;
      if (y - 1 > 0) bs[x][y - 2]--;
      if (x > 0) bs[x - 1][y - 1]--;
      if (x < n - 1) bs[x + 1][y - 1]--;
      if (y - 1 > 0 && mat[x][y - 2] == '.' && bs[x][y - 2] == 1)
        bfs.push(make_pair(x, y - 2));
      if (x > 0 && mat[x - 1][y - 1] == '.' && bs[x - 1][y - 1] == 1)
        bfs.push(make_pair(x - 1, y - 1));
      if (x < n - 1 && mat[x + 1][y - 1] == '.' && bs[x + 1][y - 1] == 1)
        bfs.push(make_pair(x + 1, y - 1));
      continue;
    }
    if (x < n - 1 && mat[x + 1][y] == '.') {
      mat[x][y] = '^', mat[x + 1][y] = 'v', bs[x][y] = 0;
      if (y > 0) bs[x + 1][y - 1]--;
      if (x + 1 < n - 1) bs[x + 2][y]--;
      if (y < m - 1) bs[x + 1][y + 1]--;
      if (y > 0 && mat[x + 1][y - 1] == '.' && bs[x + 1][y - 1] == 1)
        bfs.push(make_pair(x + 1, y - 1));
      if (x + 1 < n - 1 && mat[x + 2][y] == '.' && bs[x + 2][y] == 1)
        bfs.push(make_pair(x + 2, y));
      if (y < m - 1 && mat[x + 1][y + 1] == '.' && bs[x + 1][y + 1] == 1)
        bfs.push(make_pair(x + 1, y + 1));
      continue;
    }
    if (y < m - 1 && mat[x][y + 1] == '.') {
      mat[x][y] = '<', mat[x][y + 1] = '>', bs[x][y] = 0;
      if (x > 0) bs[x - 1][y + 1]--;
      if (y + 1 < m - 1) bs[x][y + 2]--;
      if (x < n - 1) bs[x + 1][y + 1]--;
      if (x > 0 && mat[x - 1][y + 1] == '.' && bs[x - 1][y + 1] == 1)
        bfs.push(make_pair(x - 1, y + 1));
      if (y + 1 < m - 1 && mat[x][y + 2] == '.' && bs[x][y + 2] == 1)
        bfs.push(make_pair(x, y + 2));
      if (x < n - 1 && mat[x + 1][y + 1] == '.' && bs[x + 1][y + 1] == 1)
        bfs.push(make_pair(x + 1, y + 1));
      continue;
    }
  }
  bool ok = true;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (mat[i][j] == '.') ok = false;
  if (!ok) {
    cout << "Not unique";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << mat[i][j];
    cout << endl;
  }
}
