#include <bits/stdc++.h>
using namespace std;
int n, m, d[2015][2015];
char s[2015][2015];
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
queue<int> q;
int get(int x, int y) {
  int rt = 0;
  for (int i = 0; i < 4; i++) {
    int xx = x + dx[i], yy = y + dy[i];
    if (xx < 0 || yy < 0 || xx >= n || yy >= m || s[xx][yy] != '.') continue;
    rt++;
  }
  return rt;
}
bool run() {
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++)
      if (s[i][j] == '.') {
        cnt++;
        d[i][j] = get(i, j);
        if (d[i][j] == 0)
          return 0;
        else if (d[i][j] == 1) {
          q.push(i);
          q.push(j);
        }
      }
  }
  if (!cnt) return 1;
  if (cnt & 1) return 0;
  while (!q.empty()) {
    int xx, x = q.front();
    q.pop();
    int yy, y = q.front();
    q.pop();
    if (s[x][y] != '.') continue;
    for (int i = 0; i < 4; i++) {
      xx = x + dx[i];
      yy = y + dy[i];
      if (xx >= 0 && yy >= 0 && xx < n && yy < m && s[xx][yy] == '.') break;
    }
    if (xx > x) {
      s[x][y] = '^';
      s[xx][yy] = 'v';
    } else if (xx < x) {
      s[x][y] = 'v';
      s[xx][yy] = '^';
    } else if (yy > y) {
      s[x][y] = '<';
      s[xx][yy] = '>';
    } else {
      s[x][y] = '>';
      s[xx][yy] = '<';
    }
    cnt -= 2;
    for (int i = 0; i < 4; i++) {
      x = xx + dx[i], y = yy + dy[i];
      if (x < 0 || y < 0 || x >= n || y >= m || s[x][y] != '.') continue;
      d[x][y]--;
      if (d[x][y] == 0) return 0;
      if (d[x][y] == 1) {
        q.push(x);
        q.push(y);
      }
    }
  }
  if (cnt) return 0;
  return 1;
}
int main() {
  scanf("%d%d\n", &n, &m);
  for (int i = 0; i < n; i++) gets(s[i]);
  if (!run()) {
    puts("Not unique");
  } else {
    for (int i = 0; i < n; i++) puts(s[i]);
  }
  return 0;
}
