#include <bits/stdc++.h>
using namespace std;
long long modexp(long long a, long long b, long long m) {
  long long r = 1;
  a = a % m;
  while (b > 0) {
    if (b & 1) r = (r * a) % m;
    b = b / 2;
    a = (a * a) % m;
  }
  return r % m;
}
int main() {
  ios_base::sync_with_stdio(0);
  long long n, m;
  cin >> n >> m;
  vector<vector<long long>> grid(n, vector<long long>(m, 0));
  vector<vector<long long>> indegree(n, vector<long long>(m, 0));
  vector<long long> dx = {0, 0, 1, -1};
  vector<long long> dy = {1, -1, 0, 0};
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      char c;
      cin >> c;
      grid[i][j] = (c == '.' ? 0 : -1);
    }
  }
  queue<pair<long long, long long>> q;
  vector<vector<char>> ans(n, vector<char>(m, '!'));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      for (int k = 0; k < 4; k++) {
        long long nx = dx[k] + i;
        long long ny = dy[k] + j;
        if (nx >= 0 && nx < n && ny >= 0 && ny < m) {
          if (grid[nx][ny] == 0) {
            indegree[i][j]++;
          }
        }
      }
      if (indegree[i][j] == 1) q.push(make_pair(i, j));
      if (grid[i][j] == -1) ans[i][j] = '*';
    }
  }
  while (!q.empty()) {
    pair<long long, long long> p = q.front();
    long long x = p.first;
    long long y = p.second;
    q.pop();
    if (ans[x][y] != '!') continue;
    indegree[x][y]--;
    for (int k = 0; k < 4; k++) {
      long long nx = dx[k] + x;
      long long ny = dy[k] + y;
      if (nx >= 0 && nx < n && ny >= 0 && ny < m) {
        if (ans[nx][ny] == '!') {
          indegree[nx][ny] = 0;
          for (int ind = 0; ind < 4; ind++) {
            long long nxx = dx[ind] + nx;
            long long nyy = dy[ind] + ny;
            if (nxx >= 0 && nxx < n && nyy >= 0 && nyy < m) {
              indegree[nxx][nyy]--;
              if (indegree[nxx][nyy] == 1) q.push(make_pair(nxx, nyy));
            }
          }
          if (k == 0) {
            ans[x][y] = '<';
            ans[nx][ny] = '>';
          } else if (k == 1) {
            ans[x][y] = '>';
            ans[nx][ny] = '<';
          } else if (k == 2) {
            ans[x][y] = '^';
            ans[nx][ny] = 'v';
          } else {
            ans[x][y] = 'v';
            ans[nx][ny] = '^';
          }
        }
      }
    }
  }
  long long f = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (ans[i][j] == '!') {
        f = 1;
        break;
      }
    }
    if (f) break;
  }
  if (f) {
    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;
}
