#include <bits/stdc++.h>
using namespace std;
const int N = 2007;
vector<pair<int, int>> D{{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
vector<string> nap{"v^", "^v", "><", "<>"};
template <typename T, typename U>
pair<T, U> const operator+(pair<T, U> const& lhs, pair<T, U> const& rhs) {
  return {lhs.first + rhs.first, lhs.second + rhs.second};
}
int deg[N][N];
char C[N][N];
char& get(pair<int, int> const& P) { return C[P.first][P.second]; }
int& det(pair<int, int> const& P) { return deg[P.first][P.second]; }
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> (C[i] + 1);
  }
  for (int i = 0; i <= n; i++) C[i][m + 1] = C[i + 1][0] = '*';
  for (int i = 0; i <= m; i++) C[0][i] = C[n + 1][i + 1] = '*';
  queue<pair<int, int>> Q;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (C[i][j] == '*') continue;
      pair<int, int> P{i, j};
      for (auto dx : D) {
        if (get(P + dx) == '.') deg[i][j]++;
      }
      if (deg[i][j] == 1) Q.emplace(i, j);
    }
  }
  while (!Q.empty()) {
    auto p = Q.front();
    Q.pop();
    if (get(p) != '.') continue;
    int idx = 0;
    for (auto dx : D) {
      if (get(p + dx) == '.') {
        for (auto dy : D) {
          if (--det(p + dy) == 1) Q.push(p + dy);
          if (--det(p + dx + dy) == 1) Q.push(p + dx + dy);
        }
        get(p) = nap[idx][0];
        get(p + dx) = nap[idx][1];
      }
      idx++;
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (C[i][j] == '.') {
        cout << "Not unique" << endl;
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    C[i][m + 1] = 0;
    cout << (C[i] + 1) << endl;
  }
}
