#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 2e2;
int degree[maxn][maxn];
char mp[maxn][maxn];
int vis[maxn][maxn];
int n, m;
struct node {
  int x, y;
  int tx, ty;
};
queue<node> q;
void init() {
  while (q.size()) q.pop();
  memset(degree, 0, sizeof(degree));
  memset(vis, 0, sizeof(vis));
}
int step[4][2] = {1, 0, -1, 0, 0, 1, 0, -1};
void check(int x, int y) {
  int cnt = 0, ttx, tty;
  for (int i = 0; i < 4; ++i) {
    int tx = x + step[i][0];
    int ty = y + step[i][1];
    if (tx < 0 || tx >= n || ty < 0 || ty >= m) continue;
    if (mp[tx][ty] == '.') {
      cnt++;
      ttx = tx;
      tty = ty;
    }
  }
  if (cnt == 1 && !vis[x][y] && !vis[ttx][tty]) {
    q.push(node{x, y, ttx, tty});
    vis[x][y] = 1;
    vis[ttx][tty] = 1;
  }
  degree[x][y] = cnt;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%s", mp[i]);
  }
  init();
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (mp[i][j] == '.') check(i, j);
    }
  }
  int flag = 1;
  while (q.size()) {
    node now = q.front();
    q.pop();
    int x = now.x, y = now.y, tx = now.tx, ty = now.ty;
    if (x == tx) {
      if (y < ty)
        mp[x][y] = '<', mp[tx][ty] = '>';
      else
        mp[x][y] = '>', mp[tx][ty] = '<';
    } else {
      if (x < tx)
        mp[x][y] = '^', mp[tx][ty] = 'v';
      else
        mp[x][y] = 'v', mp[tx][ty] = '^';
    }
    for (int i = 0; i < 4; ++i) {
      int netx = tx + step[i][0];
      int nety = ty + step[i][1];
      if (netx == x && nety == y) continue;
      if (netx < 0 || netx >= n || nety < 0 || nety >= m) continue;
      if (mp[netx][nety] == '.') {
        if (--degree[netx][nety] == 1) {
          for (int j = 0; j < 4; ++j) {
            int ttx = netx + step[j][0];
            int tty = nety + step[j][1];
            if (ttx < 0 || ttx >= n || tty < 0 || tty >= m) continue;
            if (mp[ttx][tty] == '.' && !vis[ttx][tty]) {
              q.push(node{netx, nety, ttx, tty});
              vis[netx][nety] = 1;
              vis[ttx][tty] = 1;
              break;
            }
          }
        }
      }
    }
  }
  if (flag == 0) {
    printf("Not unique\n");
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (mp[i][j] == '.') {
        printf("Not unique\n");
        return 0;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    printf("%s\n", mp[i]);
  }
  return 0;
}
