#include <bits/stdc++.h>
using namespace std;
int n, m;
char g[2005][2005];
int v[2005][2005];
int f;
vector<pair<int, int> > coda;
void usa(int i, int j) {
  v[i - 1][j]--;
  if (v[i - 1][j] == 1) coda.push_back(pair<int, int>(i - 1, j));
  v[i + 1][j]--;
  if (v[i + 1][j] == 1) coda.push_back(pair<int, int>(i + 1, j));
  v[i][j + 1]--;
  if (v[i][j + 1] == 1) coda.push_back(pair<int, int>(i, j + 1));
  v[i][j - 1]--;
  if (v[i][j - 1] == 1) coda.push_back(pair<int, int>(i, j - 1));
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      cin >> g[i][j];
      if (g[i][j] == '.') {
        v[i - 1][j]++;
        v[i + 1][j]++;
        v[i][j + 1]++;
        v[i][j - 1]++;
      }
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (g[i][j] == '*') {
        f++;
        continue;
      }
      if (v[i][j] == 0) {
        cout << "Not unique";
        return 0;
      }
      if (v[i][j] == 1) coda.push_back(pair<int, int>(i, j));
    }
  while (!coda.empty()) {
    int i = coda.back().first;
    int j = coda.back().second;
    coda.pop_back();
    if (g[i][j] != '.') continue;
    if (v[i][j] == 0) {
      cout << "Not unique";
      return 0;
    }
    if (g[i + 1][j] == '.') {
      g[i][j] = '^';
      g[i + 1][j] = 'v';
      usa(i + 1, j);
    }
    if (g[i - 1][j] == '.') {
      g[i - 1][j] = '^';
      g[i][j] = 'v';
      usa(i - 1, j);
    }
    if (g[i][j + 1] == '.') {
      g[i][j] = '<';
      g[i][j + 1] = '>';
      usa(i, j + 1);
    }
    if (g[i][j - 1] == '.') {
      g[i][j - 1] = '<';
      g[i][j] = '>';
      usa(i, j - 1);
    }
    usa(i, j);
    f += 2;
  }
  if (f < n * m) {
    cout << "Not unique";
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) cout << g[i][j];
    cout << '\n';
  }
  return 0;
}
