#include <bits/stdc++.h>
const int dx[] = {-1, 1, 0, 0}, dy[] = {0, 0, -1, 1};
char c[2100][2100], d[2100][2100];
int gx[5000000], gy[5000000];
int i, j, k, l, m, n, x, y, tx, ty, head, tail;
int main() {
  scanf("%d%d", &n, &m);
  getchar();
  for (i = 1; i <= n; i++) gets(c[i] + 1);
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (c[i][j] == '.')
        for (k = 0; k < 4; k++) {
          x = i + dx[k], y = j + dy[k];
          if ((x > 0) && (x <= n) && (y > 0) && (y <= m) && (c[x][y] == '.'))
            d[x][y]++;
        }
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (d[i][j] == 1) tail++, gx[tail] = i, gy[tail] = j;
  for (head = 1; head <= tail; head++) {
    if (c[gx[head]][gy[head]] != '.') continue;
    for (k = 0; k < 4; k++) {
      x = gx[head] + dx[k], y = gy[head] + dy[k];
      if ((x > 0) && (x <= n) && (y > 0) && (y <= m) && (c[x][y] == '.')) {
        d[gx[head]][gy[head]]--, d[x][y]--;
        switch (k) {
          case 0:
            c[x][y] = '^', c[x + 1][y] = 'v';
            break;
          case 1:
            c[x][y] = 'v', c[x - 1][y] = '^';
            break;
          case 2:
            c[x][y] = '<', c[x][y + 1] = '>';
            break;
          case 3:
            c[x][y] = '>', c[x][y - 1] = '<';
            break;
        }
        for (k = 0; k < 4; k++) {
          tx = x + dx[k], ty = y + dy[k];
          if ((tx > 0) && (tx <= n) && (ty > 0) && (ty <= m) &&
              (c[tx][ty] == '.')) {
            d[x][y]--, d[tx][ty]--;
            if (d[tx][ty] == 1) tail++, gx[tail] = tx, gy[tail] = ty;
          }
        }
        break;
      }
    }
  }
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (c[i][j] == '.') {
        puts("Not unique");
        return 0;
      }
  for (i = 1; i <= n; i++) puts(c[i] + 1);
  return 0;
}
