#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int kMaxM = 2007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<string> grid(n);
  unordered_map<int, int> counts;
  unordered_set<int> good;
  for (int i = 0; i < n; ++i) {
    cin >> grid[i];
  }
  vector<pair<int, int>> moves = {{-1, 0}, {0, -1}, {0, 1}, {1, 0}};
  auto in = [&](int i, int j) { return i >= 0 && i < n && j >= 0 && j < m; };
  auto fre = [&](int i, int j) { return in(i, j) && grid[i][j] == '.'; };
  auto get_id = [&](int i, int j) { return i * kMaxM + j; };
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (grid[i][j] == '.') {
        auto& cur = counts[get_id(i, j)];
        for (const auto& mov : moves) {
          if (fre(i + mov.first, j + mov.second)) {
            ++cur;
          }
        }
        if (cur == 1) {
          good.emplace(get_id(i, j));
        }
      }
    }
  }
  while (!good.empty()) {
    auto it = good.begin();
    int i = *it / kMaxM, j = *it % kMaxM;
    counts.erase(*it);
    good.erase(it);
    int fi, fj;
    if (fre(i + 1, j)) {
      fi = i + 1, fj = j;
      grid[i][j] = '^';
      grid[fi][fj] = 'v';
    } else if (fre(i, j + 1)) {
      fi = i, fj = j + 1;
      grid[i][j] = '<';
      grid[fi][fj] = '>';
    } else if (fre(i - 1, j)) {
      fi = i - 1, fj = j;
      grid[fi][fj] = '^';
      grid[i][j] = 'v';
    } else if (fre(i, j - 1)) {
      fi = i, fj = j - 1;
      grid[i][j] = '>';
      grid[fi][fj] = '<';
    } else {
      assert(false);
    }
    good.erase(get_id(fi, fj));
    counts.erase(get_id(fi, fj));
    for (const auto& mov : moves) {
      int ni = fi + mov.first, nj = fj + mov.second;
      if (fre(ni, nj)) {
        int id = get_id(ni, nj);
        --counts[id];
        if (counts[id] == 1) {
          good.emplace(id);
        } else if (counts[id] <= 0) {
          good.erase(id);
          counts.erase(id);
        }
      }
    }
  }
  bool filled = true;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (grid[i][j] == '.') {
        filled = false;
      }
    }
  }
  if (filled) {
    for (int i = 0; i < n; ++i) {
      cout << grid[i] << '\n';
    }
  } else {
    cout << "Not unique\n";
  }
  return 0;
}
