#include <bits/stdc++.h>
int main() {
  size_t n, m;
  std::cin >> n >> m >> std::ws;
  std::vector<std::string> field(n);
  for (size_t i = 0; i != n; ++i) std::getline(std::cin, field[i]);
  std::vector<size_t> power(m * n, 0);
  for (size_t i = 0; i != n; ++i) {
    for (size_t j = 0; j != m; ++j) {
      if (field[i][j] != '.') continue;
      if (i != n - 1 && field[i + 1][j] == '.') {
        ++power[i + j * n];
        ++power[i + 1 + j * n];
      }
      if (j != m - 1 && field[i][j + 1] == '.') {
        ++power[i + j * n];
        ++power[i + (j + 1) * n];
      }
    }
  }
  std::queue<size_t> q;
  for (size_t i = 0; i != power.size(); ++i)
    if (power[i] == 1) q.push(i);
  while (!q.empty()) {
    size_t const u = q.front();
    q.pop();
    if (power[u] != 1) continue;
    size_t const i = u % n;
    size_t const j = u / n;
    size_t x, y;
    if (i != 0 && field[i - 1][j] == '.') {
      y = i - 1;
      x = j;
      field[y][j] = '^';
      field[i][j] = 'v';
    } else if (i != n - 1 && field[i + 1][j] == '.') {
      y = i + 1;
      x = j;
      field[y][j] = 'v';
      field[i][j] = '^';
    } else if (j != 0 && field[i][j - 1] == '.') {
      y = i;
      x = j - 1;
      field[i][x] = '<';
      field[i][j] = '>';
    } else if (j != m - 1 && field[i][j + 1] == '.') {
      y = i;
      x = j + 1;
      field[i][x] = '>';
      field[i][j] = '<';
    }
    power[y + x * n] = 0;
    if (x != 0 && field[y][x - 1] == '.') {
      size_t const p = --power[y + (x - 1) * n];
      if (p == 1) q.push(y + (x - 1) * n);
    }
    if (x != m - 1 && field[y][x + 1] == '.') {
      size_t const p = --power[y + (x + 1) * n];
      if (p == 1) q.push(y + (x + 1) * n);
    }
    if (y != 0 && field[y - 1][x] == '.') {
      size_t const p = --power[y - 1 + x * n];
      if (p == 1) q.push(y - 1 + x * n);
    }
    if (y != n - 1 && field[y + 1][x] == '.') {
      size_t const p = --power[y + 1 + x * n];
      if (p == 1) q.push(y + 1 + x * n);
    }
  }
  for (size_t i = 0; i != n; ++i) {
    for (size_t j = 0; j != m; ++j) {
      if (field[i][j] == '.') {
        std::cout << "Not unique" << std::endl;
        return 0;
      }
    }
  }
  for (size_t i = 0; i != n; ++i) std::cout << field[i] << std::endl;
  return 0;
}
