#include <bits/stdc++.h>
using namespace std;
char o[2010][2010], s[2010][2010];
int dx[] = {-1, 1, 0, 0}, dy[] = {0, 0, -1, 1};
int n, m, a[2010][2010];
char v[] = "v^><", w[] = "^v<>";
bool out(int x, int y) { return x < 0 || x >= n || y < 0 || y >= m; }
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", o[i]);
  queue<pair<int, int> > q;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (o[i][j] == '*') continue;
      int ad = 0;
      for (int k = 0; k < 4; k++) {
        int _x = i + dx[k], _y = j + dy[k];
        ad += !out(_x, _y) && o[_x][_y] == '.';
      }
      if ((a[i][j] = ad) == 1) q.emplace(i, j);
    }
  }
  while (q.size()) {
    auto u = q.front();
    q.pop();
    int x = u.first, y = u.second;
    if (a[x][y] != 1) continue;
    int d, nx, ny;
    for (int i = 0; i < 4; i++) {
      int _x = x + dx[i], _y = y + dy[i];
      if (out(_x, _y) || s[_x][_y] || o[_x][_y] == '*') continue;
      nx = _x;
      ny = _y;
      d = i;
    }
    s[x][y] = v[d];
    s[nx][ny] = w[d];
    --a[nx][ny];
    for (int i = 0; i < 4; i++) {
      int _x = nx + dx[i], _y = ny + dy[i];
      if (out(_x, _y) || s[_x][_y] || o[_x][_y] == '*') continue;
      if (--a[_x][_y] == 1) q.emplace(_x, _y);
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (!s[i][j]) {
        if (o[i][j] == '*')
          s[i][j] = '*';
        else {
          puts("Not unique");
          return 0;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) puts(s[i]);
  return 0;
}
