#include <bits/stdc++.h>
using namespace std;
vector<string> G;
vector<vector<int> > L;
int x[] = {0, 0, 1, -1};
int y[] = {1, -1, 0, 0};
bool Y;
void G_edit(int k, int i, int j, int z1, int z2) {
  if (k == 0) {
    G[i][j] = '<';
    G[z1][z2] = '>';
  }
  if (k == 1) {
    G[i][j] = '>';
    G[z1][z2] = '<';
  }
  if (k == 2) {
    G[i][j] = '^';
    G[z1][z2] = 'v';
  }
  if (k == 3) {
    G[i][j] = 'v';
    G[z1][z2] = '^';
  }
  return;
}
int main() {
  int i, j, k, l;
  int m, n;
  cin >> n >> m;
  L.resize(n + 1);
  G.resize(n + 1);
  for (i = 0; i < n; i++) {
    cin >> G[i];
    L[i].resize(m + 1, 0);
  }
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++)
      if (G[i][j] == '.')
        for (k = 0; k < 4; k++)
          if (i + x[k] >= 0 && i + x[k] < n && j + y[k] >= 0 && j + y[k] < m)
            if (G[i + x[k]][j + y[k]] == '.') L[i + x[k]][j + y[k]]++;
  vector<int> q;
  int emp = 0;
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++)
      if (G[i][j] == '.') {
        emp++;
        if (L[i][j] == 1) {
          q.push_back(i);
          q.push_back(j);
        } else if (L[i][j] == 0) {
          cout << "Not unique";
          return 0;
        }
      }
  if (q.empty() && emp) {
    cout << "Not unique";
    return 0;
  }
  for (i = 0; i < q.size(); i += 2) {
    if (G[q[i]][q[i + 1]] != '.') continue;
    for (k = 0; k < 4; k++)
      if (q[i] + x[k] >= 0 && q[i] + x[k] < n && q[i + 1] + y[k] >= 0 &&
          q[i + 1] + y[k] < m)
        if (G[q[i] + x[k]][q[i + 1] + y[k]] == '.') break;
    int z1, z2;
    z1 = q[i] + x[k];
    z2 = q[i + 1] + y[k];
    G_edit(k, q[i], q[i + 1], z1, z2);
    for (k = 0; k < 4; k++)
      if (z1 + x[k] >= 0 && z1 + x[k] < n && z2 + y[k] >= 0 && z2 + y[k] < m)
        if (G[z1 + x[k]][z2 + y[k]] == '.') {
          L[z1 + x[k]][z2 + y[k]]--;
          if (L[z1 + x[k]][z2 + y[k]] == 1) {
            q.push_back(z1 + x[k]);
            q.push_back(z2 + y[k]);
          }
        }
  }
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++)
      if (G[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
  for (i = 0; i < n; i++) cout << G[i] << '\n';
  return 0;
}
