#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int MAXN = 2048;
int n, m, to[MAXN][MAXN];
bool vis[MAXN][MAXN];
string s[MAXN];
vector<pair<int, int> > moves = {{-1, 0}, {0, -1}, {1, 0}, {0, 1}};
vector<pair<int, int> > v;
int pos(int i, int j) { return m * i + j; }
bool can(int i, int j) {
  return 0 <= i && i < n && 0 <= j && j < m && s[i][j] == '.';
}
int get(int i, int j) {
  int res = 0;
  for (auto it : moves)
    if (can(i + it.first, j + it.second)) {
      res++;
      to[i][j] = pos(i + it.first, j + it.second);
    }
  return res;
}
void upd(int i, int j) {
  if (!can(i, j)) return;
  if (vis[i][j]) return;
  if (get(i, j) == 1) {
    vis[i][j] = 1;
    v.push_back({i, j});
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0, ggdem = n; i < ggdem; i++) cin >> s[i];
  for (int i = 0, ggdem = n; i < ggdem; i++)
    for (int j = 0, ggdem = m; j < ggdem; j++) upd(i, j);
  while (((int)(v).size())) {
    pair<int, int> t = v.back();
    v.pop_back();
    int xs = t.first;
    int ys = t.second;
    if (s[xs][ys] != '.' || get(xs, ys) != 1) continue;
    int xe = to[t.first][t.second] / m;
    int ye = to[t.first][t.second] % m;
    if (xs == xe) {
      s[xs][ys] = '<';
      s[xe][ye] = '>';
      if (ys > ye) swap(s[xs][ys], s[xe][ye]);
    } else {
      s[xs][ys] = '^';
      s[xe][ye] = 'v';
      if (xs > xe) swap(s[xs][ys], s[xe][ye]);
    }
    for (auto it : moves) upd(xs + it.first, ys + it.second);
    for (auto it : moves) upd(xe + it.first, ye + it.second);
  }
  for (int i = 0, ggdem = n; i < ggdem; i++)
    for (int j = 0, ggdem = m; j < ggdem; j++)
      if (s[i][j] == '.') cout << "Not unique\n", exit(0);
  for (int i = 0, ggdem = n; i < ggdem; i++) cout << s[i] << "\n";
}
