#include <bits/stdc++.h>
struct queue {
  int x;
  int y;
};
queue q[4000004];
int m, n, front, rear;
int degree[2003][2003];
char g[2003][2003];
int changedeg(int x, int y) {
  degree[x][y]--;
  if (degree[x][y] == 0) return 0;
  if (degree[x][y] == 1) {
    q[rear].x = x;
    q[rear].y = y;
    rear++;
  }
  return 1;
}
int update(int x, int y) {
  degree[x][y] = -1;
  if (x > 0 && degree[x - 1][y] != -1) {
    if (!changedeg(x - 1, y)) return 0;
  }
  if (y > 0 && degree[x][y - 1] != -1) {
    if (!changedeg(x, y - 1)) return 0;
  }
  if (x + 1 < n && degree[x + 1][y] != -1) {
    if (!changedeg(x + 1, y)) return 0;
  }
  if (y + 1 < m && degree[x][y + 1] != -1) {
    if (!changedeg(x, y + 1)) return 0;
  }
  return 1;
}
int main() {
  scanf("%d%d", &n, &m);
  memset(degree, 0, sizeof(degree));
  int count = 0, ok = 1;
  char c;
  for (int i = 0; i < n; i++) {
    getchar();
    for (int j = 0; j < m; j++) {
      scanf("%c", &c);
      if (c == '*') {
        g[i][j] = '*';
        degree[i][j] = -1;
      } else {
        count++;
        if (i > 0 && degree[i - 1][j] != -1) degree[i - 1][j]++;
        if (j > 0 && degree[i][j - 1] != -1) degree[i][j - 1]++;
        if (i + 1 < n) degree[i + 1][j]++;
        if (j + 1 < m) degree[i][j + 1]++;
      }
    }
  }
  front = 0, rear = 0;
  if (count % 2)
    ok = 0;
  else {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (degree[i][j] == 0) {
          ok = 0;
          break;
        }
        if (degree[i][j] == 1) {
          q[rear].x = i;
          q[rear].y = j;
          rear++;
        }
      }
      if (ok == 0) break;
    }
    if (ok) {
      while (front != rear) {
        int nowx = q[front].x, nowy = q[front].y;
        if (degree[nowx][nowy] == -1) {
          front++;
          continue;
        }
        degree[nowx][nowy] = -1;
        if (nowx > 0 && degree[nowx - 1][nowy] != -1) {
          g[nowx - 1][nowy] = '^';
          g[nowx][nowy] = 'v';
          if (!update(nowx - 1, nowy)) {
            ok = 0;
            break;
          }
        } else if (nowy > 0 && degree[nowx][nowy - 1] != -1) {
          g[nowx][nowy - 1] = '<';
          g[nowx][nowy] = '>';
          if (!update(nowx, nowy - 1)) {
            ok = 0;
            break;
          }
        } else if (nowx + 1 < n && degree[nowx + 1][nowy] != -1) {
          g[nowx + 1][nowy] = 'v';
          g[nowx][nowy] = '^';
          if (!update(nowx + 1, nowy)) {
            ok = 0;
            break;
          }
        } else if (nowy + 1 < m && degree[nowx][nowy + 1] != -1) {
          g[nowx][nowy + 1] = '>';
          g[nowx][nowy] = '<';
          if (!update(nowx, nowy + 1)) {
            ok = 0;
            break;
          }
        }
        front++;
        count = count - 2;
        if (!count) break;
      }
    }
  }
  if (!ok || count)
    printf("Not unique\n");
  else {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        printf("%c", g[i][j]);
      }
      printf("\n");
    }
  }
  return 0;
}
