#include <bits/stdc++.h>
using namespace std;
int n, m, cnt[2000 + 100][2000 + 100];
string str[2000 + 100];
bool o[2000 + 100][2000 + 100];
char ans[2000 + 100][2000 + 100];
queue<pair<int, int> > q;
void sredi(int x, int y, int x1, int y1) {
  if (x == x1 && y > y1)
    ans[x][y] = '>', ans[x][y1] = '<';
  else if (x == x1 && y < y1)
    ans[x][y] = '<', ans[x][y1] = '>';
  else if (y == y1 && x > x1)
    ans[x][y] = 'v', ans[x1][y] = '^';
  else
    ans[x][y] = '^', ans[x1][y] = 'v';
}
void ubaci(int x, int y) {
  if (y != 0 && ans[x][y - 1] == '.') cnt[x][y - 1]--;
  if (y != m - 1 && ans[x][y + 1] == '.') cnt[x][y + 1]--;
  if (x != 1 && ans[x - 1][y] == '.') cnt[x - 1][y]--;
  if (x != n && ans[x + 1][y] == '.') cnt[x + 1][y]--;
  if (cnt[x][y - 1] == 1) q.push({x, y - 1});
  if (cnt[x][y + 1] == 1) q.push({x, y + 1});
  if (cnt[x - 1][y] == 1) q.push({x - 1, y});
  if (cnt[x + 1][y] == 1) q.push({x + 1, y});
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> str[i];
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < m; j++) {
      ans[i][j] = str[i][j];
      if (str[i][j] != '.') continue;
      if (j != 0 && str[i][j - 1] == '.') cnt[i][j]++;
      if (j != m - 1 && str[i][j + 1] == '.') cnt[i][j]++;
      if (i != 1 && str[i - 1][j] == '.') cnt[i][j]++;
      if (i != n && str[i + 1][j] == '.') cnt[i][j]++;
      if (cnt[i][j] == 1) q.push({i, j});
    }
  while (!q.empty()) {
    int x = q.front().first;
    int y = q.front().second;
    if (o[x][y]) {
      q.pop();
      continue;
    }
    o[x][y] = 1;
    if (y != 0 && ans[x][y - 1] == '.' && !o[x][y - 1]) {
      sredi(x, y, x, y - 1);
      ubaci(x, y - 1);
    }
    if (y != m - 1 && ans[x][y + 1] == '.' && !o[x][y + 1]) {
      sredi(x, y, x, y + 1);
      ubaci(x, y + 1);
    }
    if (x != 1 && ans[x - 1][y] == '.' && !o[x - 1][y]) {
      sredi(x, y, x - 1, y);
      ubaci(x - 1, y);
    }
    if (x != n && ans[x + 1][y] == '.' && !o[x + 1][y]) {
      sredi(x, y, x + 1, y);
      ubaci(x + 1, y);
    }
  }
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < m; j++)
      if (ans[i][j] == '.') {
        cout << "Not unique" << endl;
        return 0;
      }
  for (int i = 1; i <= n; i++, cout << endl)
    for (int j = 0; j < m; j++) printf("%c", ans[i][j]);
  return 0;
}
