#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int DX[] = {0, +1, 0, -1}, DY[] = {+1, 0, -1, 0};
const char DC[4][2] = {{'<', '>'}, {'^', 'v'}, {'>', '<'}, {'v', '^'}};
int h, w;
char g[2000][2000];
int deg[2000][2000];
int qx[2000 * 2000], qy[2000 * 2000], qhead, qtail;
void run() {
  scanf("%d%d", &h, &w);
  for (int x = (0); x < (h); ++x)
    for (int y = (0); y < (w); ++y) scanf(" %c", &g[x][y]);
  for (int x = (0); x < (h); ++x)
    for (int y = (0); y < (w); ++y)
      if (g[x][y] == '.') {
        deg[x][y] = 0;
        for (int k = (0); k < (4); ++k) {
          int nx = x + DX[k], ny = y + DY[k];
          if (0 <= nx && nx < h && 0 <= ny && ny < w && g[nx][ny] == '.')
            ++deg[x][y];
        }
      }
  qhead = qtail = 0;
  for (int x = (0); x < (h); ++x)
    for (int y = (0); y < (w); ++y)
      if (g[x][y] == '.' && deg[x][y] == 1) {
        qx[qhead] = x;
        qy[qhead] = y;
        ++qhead;
      }
  while (qtail < qhead) {
    int x = qx[qtail], y = qy[qtail];
    ++qtail;
    if (g[x][y] != '.') continue;
    for (int k = (0); k < (4); ++k) {
      int nx = x + DX[k], ny = y + DY[k];
      if (0 <= nx && nx < h && 0 <= ny && ny < w && g[nx][ny] == '.') {
        g[x][y] = DC[k][0];
        g[nx][ny] = DC[k][1];
        for (int kk = (0); kk < (4); ++kk) {
          int xx = nx + DX[kk], yy = ny + DY[kk];
          if (0 <= xx && xx < h && 0 <= yy && yy < w && g[xx][yy] == '.' &&
              --deg[xx][yy] == 1) {
            qx[qhead] = xx;
            qy[qhead] = yy;
            ++qhead;
          }
        }
        break;
      }
    }
  }
  for (int x = (0); x < (h); ++x)
    for (int y = (0); y < (w); ++y)
      if (g[x][y] == '.') {
        printf("Not unique\n");
        return;
      }
  for (int x = (0); x < (h); ++x) {
    for (int y = (0); y < (w); ++y) printf("%c", g[x][y]);
    puts("");
  }
}
int main() {
  run();
  return 0;
}
