#include <bits/stdc++.h>
using namespace std;
int n, m;
string grid[2010];
int deg[2010 * 2010];
queue<int> Q;
const int d[4][2] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};
bool chk(int i, int j) {
  return i >= 0 && i < n && j >= 0 && j < m && grid[i][j] == '.';
}
void fit(int ui, int uj, int vi, int vj) {
  if (abs(ui - vi) == 1) {
    grid[min(ui, vi)][vj] = '^';
    grid[max(ui, vi)][vj] = 'v';
  } else {
    grid[ui][max(uj, vj)] = '>';
    grid[ui][min(uj, vj)] = '<';
  }
}
bool check_grid() {
  bool ret = true;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) ret &= grid[i][j] != '.';
  return ret;
}
void print() {
  for (int i = 0; i < n; i++) cout << grid[i] << "\n";
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> grid[i];
  bool poss = true;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if ((i + j) % 2 == 0 && grid[i][j] == '.') {
        for (int k = 0; k < 4; k++) {
          int vi = i + d[k][0];
          int vj = j + d[k][1];
          if (chk(vi, vj)) {
            deg[i * m + j]++;
          }
        }
        if (deg[i * m + j] == 1) Q.push(i * m + j);
        poss = deg[i * m + j] > 0;
      }
  if (!poss) {
    cout << "Not unique\n";
    return 0;
  }
  while (!Q.empty()) {
    int u = Q.front();
    Q.pop();
    int ui = u / m;
    int uj = u % m;
    for (int k = 0; k < 4; k++) {
      int vi = ui + d[k][0];
      int vj = uj + d[k][1];
      if (chk(vi, vj)) {
        fit(ui, uj, vi, vj);
        for (int l = 0; l < 4; l++) {
          int wi = vi + d[l][0];
          int wj = vj + d[l][1];
          if (wi == ui && wj == uj) continue;
          if (chk(wi, wj)) {
            deg[wi * m + wj]--;
            if (deg[wi * m + wj] == 1) Q.push(wi * m + wj);
          }
        }
      }
    }
  }
  poss = check_grid();
  if (!poss) {
    cout << "Not unique\n";
  } else
    print();
  return 0;
}
