#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2020;
int xm[] = {0, 0, 1, -1}, ym[] = {1, -1, 0, 0};
struct tnode {
  int x, y, num, data;
};
queue<tnode> p;
int a[MAXN][MAXN], num[MAXN][MAXN], c[MAXN * MAXN];
char s[MAXN];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  memset(a, 0, sizeof(a));
  memset(c, 0, sizeof(c));
  for (int i = 0; i < n; i++) {
    scanf("%s", &s);
    for (int j = 0; j < m; j++) {
      if (s[j] == '*') a[i][j] = 1;
    }
  }
  int nx = 0, ny = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (i % 2 == j % 2) num[i][j] = ++nx;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (i % 2 != j % 2) num[i][j] = ++ny + nx;
    }
  }
  int all = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (!a[i][j]) {
        for (int t = 0; t < 4; t++) {
          int x = i + xm[t], y = j + ym[t];
          if ((x >= 0) && (x < n) && (y >= 0) && (y < m) && (!a[x][y])) {
            c[num[i][j]]++;
          }
        }
        all++;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if ((!a[i][j]) && (c[num[i][j]] == 1)) {
        tnode u;
        u.num = num[i][j];
        u.data = c[u.num];
        u.x = i;
        u.y = j;
        p.push(u);
      }
    }
  }
  int cnt = 0;
  while (!p.empty()) {
    tnode u = p.front();
    p.pop();
    for (int i = 0; i < 4; i++) {
      int x = u.x + xm[i], y = u.y + ym[i];
      if ((x >= 0) && (x < n) && (y >= 0) && (y < m) && (!a[x][y])) {
        if (i == 2) {
          a[u.x][u.y] = 4;
          a[x][y] = 5;
        } else if (i == 3) {
          a[u.x][u.y] = 5;
          a[x][y] = 4;
        } else if (i == 0) {
          a[u.x][u.y] = 2;
          a[x][y] = 3;
        } else if (i == 1) {
          a[u.x][u.y] = 3;
          a[x][y] = 2;
        }
        for (int j = 0; j < 4; j++) {
          int xl = x + xm[j], yl = y + ym[j];
          if ((xl >= 0) && (xl < n) && (yl >= 0) && (yl < m) && (!a[xl][yl]) &&
              (c[num[xl][yl]] > 1)) {
            tnode t;
            t.x = xl;
            t.y = yl;
            t.num = num[xl][yl];
            c[t.num]--;
            t.data = c[t.num];
            if (t.data == 1) p.push(t);
          }
        }
        cnt += 2;
        break;
      }
    }
  }
  if (cnt < all)
    printf("Not unique\n");
  else {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (a[i][j] == 0)
          printf(".");
        else if (a[i][j] == 1)
          printf("*");
        else if (a[i][j] == 2)
          printf("<");
        else if (a[i][j] == 3)
          printf(">");
        else if (a[i][j] == 4)
          printf("^");
        else if (a[i][j] == 5)
          printf("v");
      }
      printf("\n");
    }
  }
  return 0;
}
