#include <bits/stdc++.h>
using namespace std;
const int N = 2002;
int d[N][N], n, m;
bool mp[N][N], mark[N][N];
int dx[4] = {0, 0, -1, 1};
int dy[4] = {-1, 1, 0, 0};
char out[4] = {'>', '<', 'v', '^'};
char ans[N][N];
queue<pair<int, int> > q;
bool valid(int x, int y) {
  if (x < 0 or y < 0 or x >= n or y >= m) return false;
  return true;
}
void upd(int x, int y) {
  mp[x][y] = true;
  for (int i = 0; i < 4; i++) {
    int nx = x + dx[i], ny = y + dy[i];
    if (valid(nx, ny)) {
      d[nx][ny]--;
      if (d[nx][ny] == 1) q.push(pair<int, int>(nx, ny));
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      for (int k = 0; k < 4; k++)
        if (valid(i + dx[k], j + dy[k])) d[i][j]++;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < m; j++)
      if (s[j] == '*')
        upd(i, j), ans[i][j] = '*';
      else
        ans[i][j] = '.';
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (!mp[i][j] && d[i][j] == 1) q.push(pair<int, int>(i, j));
  while (q.size()) {
    pair<int, int> cur = q.front();
    q.pop();
    int x = cur.first, y = cur.second;
    if (d[x][y] != 1 || mp[x][y]) continue;
    for (int i = 0; i < 4; i++) {
      int nx = dx[i] + x, ny = dy[i] + y;
      if (valid(nx, ny) && !mp[nx][ny]) {
        mp[x][y] = mp[nx][ny] = true;
        ans[x][y] = out[i];
        if (i % 2 == 0)
          i++;
        else
          i--;
        ans[nx][ny] = out[i];
        upd(nx, ny);
        upd(x, y);
        break;
      }
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (mp[i][j] == false) {
        cout << "Not unique\n";
        return 0;
      }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << ans[i][j];
    cout << "\n";
  }
  return 0;
}
