#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
const int mod = 1e9 + 7;
int add(int x, int y) {
  int res = (x + y) % mod;
  return res < 0 ? res + mod : res;
}
int mul(int x, int y) {
  int res = (x * 1LL * y) % mod;
  return res < 0 ? res + mod : res;
}
int n, m;
string a[N];
queue<pair<int, int> > q;
int op[N][N];
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
bool chk(int x, int y) {
  return (x >= 0 && y >= 0) && (x < n && y < m) && (a[x][y] == '.');
}
pair<int, int> who(int i, int j) {
  for (int k = 0; k < 4; k++) {
    if (chk(i + dx[k], j + dy[k])) {
      return {i + dx[k], j + dy[k]};
    }
  }
}
int tot(int i, int j) {
  int cur = 0;
  for (int k = 0; k < 4; k++) {
    if (chk(i + dx[k], j + dy[k])) {
      cur++;
    }
  }
  return cur;
}
void process(int i, int j) {
  for (int k = 0; k < 4; k++) {
    if (chk(i + dx[k], j + dy[k])) {
      int what = tot(i + dx[k], j + dy[k]);
      if (what == 0) {
        cout << "Not unique";
        exit(EXIT_SUCCESS);
      } else if (what == 1) {
        q.push({i + dx[k], j + dy[k]});
      }
    }
  }
}
signed main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '*') continue;
      op[i][j] = tot(i, j);
      if (op[i][j] == 1) q.push({i, j});
    }
  }
  while (!q.empty()) {
    pair<int, int> fr = q.front();
    q.pop();
    int i = fr.first, j = fr.second;
    if (a[i][j] != '.') continue;
    fr = who(i, j);
    if (fr.first != i) {
      if (fr.first < i)
        a[fr.first][fr.second] = '^', a[i][j] = 'v';
      else
        a[fr.first][fr.second] = 'v', a[i][j] = '^';
    } else {
      if (fr.second < j)
        a[fr.first][fr.second] = '<', a[i][j] = '>';
      else
        a[fr.first][fr.second] = '>', a[i][j] = '<';
    }
    process(i, j);
    process(fr.first, fr.second);
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (a[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << a[i][j];
    cout << endl;
  }
  return 0;
}
