#include <bits/stdc++.h>
using namespace std;
int n, m, d[2010][2010];
char s[2010][2010];
bool p[2010][2010][4];
int xx[] = {0, 0, 1, -1};
int yy[] = {1, -1, 0, 0};
queue<int> qx, qy;
bool judge() {
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (s[i][j] == '.') return 1;
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  int x, y, nx, ny, mx, my;
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '.') {
        for (int k = 0; k < 4; k++) {
          nx = i + xx[k], ny = j + yy[k];
          if (nx < 0 || nx >= n || ny < 0 || ny >= m || s[nx][ny] == '*')
            continue;
          p[i][j][k] = 1, d[i][j]++;
        }
        if (d[i][j] == 1) qx.push(i), qy.push(j);
      }
    }
  while (!qx.empty()) {
    x = qx.front(), y = qy.front();
    qx.pop(), qy.pop();
    for (int i = 0; i < 4; i++) {
      if (p[x][y][i]) {
        if (!xx[i]) {
          if (yy[i] == 1) {
            s[x][y + 1] = '>';
            s[x][y] = '<';
          } else {
            s[x][y] = '>';
            s[x][y - 1] = '<';
          }
        } else {
          if (xx[i] == 1) {
            s[x + 1][y] = 'v';
            s[x][y] = '^';
          } else {
            s[x][y] = 'v';
            s[x - 1][y] = '^';
          }
        }
        nx = x + xx[i], ny = y + yy[i];
        for (int j = 0; j < 4; j++)
          if (p[nx][ny][j]) {
            mx = nx + xx[j], my = ny + yy[j];
            if (s[mx][my] != '.') continue;
            p[mx][my][j ^ 1] = 0;
            d[mx][my]--;
            if (d[mx][my] == 1) qx.push(mx), qy.push(my);
          }
        break;
      }
    }
  }
  if (judge())
    cout << "Not unique";
  else {
    for (int i = 0; i <= n; i++) cout << s[i] << '\n';
  }
  return 0;
}
