#include <bits/stdc++.h>
using namespace std;
int mvx[] = {-1, 0, 1, 0}, mvy[] = {0, -1, 0, 1};
int cnt[2002][2002];
string s[2002];
char ans[2002][2002];
int main() {
  int n, m, i, j, k, left = 0;
  scanf("%d%d", &n, &m);
  ;
  for (i = 0; i < n; i++) cin >> s[i];
  queue<pair<int, int> > st;
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      ans[i][j] = '-';
      if (s[i][j] == '.')
        left++;
      else {
        ans[i][j] = '*';
        continue;
      }
      for (k = 0; k < 4; k++) {
        int x = i + mvx[k], y = j + mvy[k];
        if (x < 0 || x >= n || y < 0 || y >= m) continue;
        if (s[x][y] == '.') cnt[i][j]++;
      }
      if (cnt[i][j] == 1) st.push(make_pair(i, j));
    }
  }
  if ((st.empty() && left != 0) || (left & 1)) {
    cout << "Not unique\n";
    return 0;
  }
  while (!st.empty()) {
    int x = st.front().first, y = st.front().second;
    st.pop();
    if (ans[x][y] != '-') continue;
    int xx, yy;
    for (k = 0; k < 4; k++) {
      xx = x + mvx[k], yy = y + mvy[k];
      if (xx >= 0 && xx < n && yy >= 0 && yy < m && ans[xx][yy] == '-') break;
    }
    if (k == 4) {
      cout << "Not unique\n";
      return 0;
    }
    if (xx == x - 1)
      ans[x][y] = 'v', ans[xx][yy] = '^';
    else if (xx == x + 1)
      ans[x][y] = '^', ans[xx][yy] = 'v';
    else if (yy == y - 1)
      ans[x][y] = '>', ans[xx][yy] = '<';
    else
      ans[x][y] = '<', ans[xx][yy] = '>';
    left -= 2;
    for (k = 0; k < 4; k++) {
      x = xx + mvx[k], y = yy + mvy[k];
      if (x > -1 && x < n && y > -1 && y < m) {
        cnt[x][y]--;
        if (cnt[x][y] == 1) st.push(make_pair(x, y));
      }
    }
  }
  if (left == 0) {
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) cout << ans[i][j];
      cout << endl;
    }
  } else
    cout << "Not unique\n";
  return 0;
}
