#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5;
char grid[N][N], res[N][N];
int Free, degree[N][N];
int cx[] = {0, 1, 0, -1}, cy[] = {1, 0, -1, 0};
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) {
      cin >> grid[i][j];
      Free += (grid[i][j] == '.');
      res[i][j] = '.';
    }
  if (Free & 1) {
    cout << "Not unique" << '\n';
    return 0;
  }
  queue<pair<int, int> > q;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j)
      if (grid[i][j] == '.') {
        for (int k = 0; k < 4; ++k)
          if (grid[i + cx[k]][j + cy[k]] == '.') degree[i][j]++;
        if (degree[i][j] == 1) q.push(pair<int, int>(i, j));
      }
  }
  while (!q.empty()) {
    int i = q.front().first, j = q.front().second;
    q.pop();
    for (int k = 0; k < 4; ++k) {
      int ni = i + cx[k], nj = j + cy[k];
      if (grid[ni][nj] == '.') {
        if (res[ni][nj] != '.') continue;
        if (i == ni) {
          if (j < nj)
            res[i][j] = '<', res[ni][nj] = '>';
          else
            res[i][j] = '>', res[ni][nj] = '<';
        } else {
          if (i < ni)
            res[i][j] = '^', res[ni][nj] = 'v';
          else
            res[i][j] = 'v', res[ni][nj] = '^';
        }
        for (int d = 0; d < 4; ++d) {
          degree[ni + cx[d]][nj + cy[d]]--;
          if (degree[ni + cx[d]][nj + cy[d]] == 1)
            q.push(pair<int, int>(ni + cx[d], nj + cy[d]));
        }
        break;
      }
    }
  }
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j)
      if (res[i][j] == '.' && grid[i][j] != '*') {
        cout << "Not unique" << '\n';
        return 0;
      }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j)
      if (res[i][j] != '.')
        cout << res[i][j];
      else
        cout << '*';
    cout << '\n';
  }
  return 0;
}
