#include <bits/stdc++.h>
using namespace std;
vector<int> di = {0, 1, 0, -1};
vector<int> dj = {1, 0, -1, 0};
string pr(pair<int, int> p) {
  stringstream sin;
  sin << "(" << p.first << "," << p.second << ")";
  return sin.str();
}
void print(vector<string> &d) {
  for (int i = 0; i < d.size(); i++) {
    cout << d[i] << endl;
  }
  cout << endl;
}
pair<int, int> getNeighbour(pair<int, int> p, vector<string> &d) {
  int n = d.size();
  int m = d[0].size();
  for (int i = 0; i < 4; i++) {
    int ni = p.first + di[i];
    int nj = p.second + dj[i];
    if (ni < 0 || ni >= n) continue;
    if (nj < 0 || nj >= m) continue;
    if (d[ni][nj] == '.') return make_pair(ni, nj);
  }
  return p;
}
void setData(pair<int, int> &p, pair<int, int> &neigh, vector<string> &d) {
  int si = min(p.first, neigh.first);
  int sj = min(p.second, neigh.second);
  int ei = max(p.first, neigh.first);
  int ej = max(p.second, neigh.second);
  if (si == ei) {
    d[si][sj] = '<';
    d[ei][ej] = '>';
  } else {
    d[si][sj] = '^';
    d[ei][ej] = 'v';
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<string> d(n);
  for (int i = 0; i < n; i++) {
    cin >> d[i];
  }
  vector<vector<int> > in(n, vector<int>(m, 0));
  vector<vector<bool> > vis(n, vector<bool>(m, false));
  int need = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (d[i][j] != '.') continue;
      need++;
      for (int k = 0; k < 4; k++) {
        int ni = i + di[k];
        int nj = j + dj[k];
        if (ni < 0 || ni >= n) continue;
        if (nj < 0 || nj >= m) continue;
        if (d[ni][nj] != '.') continue;
        in[ni][nj]++;
      }
    }
  }
  queue<pair<int, int> > q;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (in[i][j] == 1) {
        vis[i][j] = true;
        pair<int, int> negh = getNeighbour(make_pair(i, j), d);
        vis[negh.first][negh.second] = true;
        q.push(make_pair(i, j));
      }
    }
  }
  int cnt = 0;
  while (!q.empty()) {
    pair<int, int> pop = q.front();
    q.pop();
    pair<int, int> neigh = getNeighbour(pop, d);
    if (pop == neigh) continue;
    setData(pop, neigh, d);
    for (int i = 0; i < 4; i++) {
      int ni = neigh.first + di[i];
      int nj = neigh.second + dj[i];
      if (ni < 0 || ni >= n) continue;
      if (nj < 0 || nj >= m) continue;
      if (d[ni][nj] != '.') continue;
      if (vis[ni][nj]) continue;
      in[ni][nj]--;
      if (in[ni][nj] == 1) {
        vis[ni][nj] = true;
        q.push(make_pair(ni, nj));
        pair<int, int> nb = getNeighbour(make_pair(ni, nj), d);
        vis[nb.first][nb.second] = true;
      }
    }
  }
  bool valid = true;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (d[i][j] == '.') {
        valid = false;
        break;
      }
    }
    if (!valid) break;
  }
  if (valid) {
    for (int i = 0; i < n; i++) cout << d[i] << endl;
  } else {
    cout << "Not unique" << endl;
  }
  return 0;
}
