#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using cd = complex<ld>;
int dd[4][2] = {{0, 1}, {1, 0}, {-1, 0}, {0, -1}};
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<string> v(n);
  for (string &e : v) {
    cin >> e;
  }
  set<pair<int, pair<int, int>>> s;
  int c[n][m];
  queue<pair<int, int>> q;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (v[i][j] == '.') {
        int cnt = 0;
        for (auto o : dd) {
          int ti = i + o[0];
          int tj = j + o[1];
          if (ti >= 0 && tj >= 0 && ti < n && tj < m && v[ti][tj] == '.') {
            cnt++;
          }
        }
        if (cnt == 1) {
          q.push({i, j});
        }
        c[i][j] = cnt;
      } else {
        c[i][j] = 0;
      }
    }
  }
  int used[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      used[i][j] = 0;
    }
  }
  while (!q.empty()) {
    int i = q.front().first;
    int j = q.front().second;
    q.pop();
    if (used[i][j]) {
      continue;
    }
    for (auto o : dd) {
      int x = i + o[0];
      int y = j + o[1];
      if (x >= 0 && y >= 0 && x < n && y < m && v[x][y] == '.') {
        for (auto u : dd) {
          int ti = x + u[0];
          int tj = y + u[1];
          if (ti >= 0 && tj >= 0 && ti < n && tj < m && v[ti][tj] == '.') {
            c[ti][tj]--;
            if (c[ti][tj] == 1) {
              q.push({ti, tj});
            }
          }
        }
        if (o[0] == 1) {
          v[i][j] = '^';
          v[x][y] = 'v';
        } else if (o[0] == -1) {
          v[i][j] = 'v';
          v[x][y] = '^';
        } else if (o[1] == 1) {
          v[i][j] = '<';
          v[x][y] = '>';
        } else if (o[1] == -1) {
          v[i][j] = '>';
          v[x][y] = '<';
        }
        used[x][y] = 1;
        used[i][j] = 1;
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (v[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << v[i][j];
    }
    cout << "\n";
  }
}
