#include <bits/stdc++.h>
using namespace std;
typedef struct POS {
  int x, y;
} Pos;
int n, xx, yy, m, cou = 0, ans = 0, p[4][2] = {-1, 0, 1, 0, 0, 1, 0, -1};
char a[2010][2010] = {0};
int vis[2010][2010] = {0};
queue<Pos> q;
void pos(int x, int y) {
  for (int i = 0; i < 4; i++) {
    if (a[x + p[i][0]][y + p[i][1]] == '.') {
      xx = p[i][0];
      yy = p[i][1];
      return;
    }
  }
}
bool enter(int x, int y) {
  int temp = 0;
  for (int i = 0; i < 4; i++) {
    if (a[x + p[i][0]][y + p[i][1]] == '.') temp++;
    if (temp > 1) return 0;
  }
  if (temp == 1)
    return 1;
  else
    return 0;
}
void bfs() {
  while (!q.empty()) {
    Pos t = q.front();
    q.pop();
    pos(t.x, t.y);
    if (vis[t.x][t.y] == 1) continue;
    vis[t.x][t.y] = 1;
    if (xx == -1) {
      a[t.x][t.y] = 'v';
      a[t.x + xx][t.y + yy] = '^';
    } else if (xx == 1) {
      a[t.x][t.y] = '^';
      a[t.x + xx][t.y + yy] = 'v';
    } else if (yy == 1) {
      a[t.x][t.y] = '<';
      a[t.x + xx][t.y + yy] = '>';
    } else if (yy == -1) {
      a[t.x][t.y] = '>';
      a[t.x + xx][t.y + yy] = '<';
    }
    ans += 2;
    vis[t.x + xx][t.y + yy] = 1;
    for (int i = 0; i < 4; i++) {
      if (a[t.x + xx + p[i][0]][t.y + yy + p[i][1]] == '.' &&
          vis[t.x + xx + p[i][0]][t.y + yy + p[i][1]] == 0 &&
          enter(t.x + xx + p[i][0], t.y + yy + p[i][1])) {
        Pos temp;
        temp.x = t.x + xx + p[i][0];
        temp.y = t.y + yy + p[i][1];
        q.push(temp);
      }
    }
  }
  if (ans == cou) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) printf("%c", a[i][j]);
      printf("\n");
    }
  } else
    printf("Not unique\n");
}
int main() {
  scanf("%d%d", &n, &m);
  getchar();
  for (int i = 1; i <= n; i++) {
    scanf("%s", a[i]);
    for (int j = m - 1; j >= 0; j--) a[i][j + 1] = a[i][j];
    a[i][0] = '*';
    a[i][m + 1] = '*';
    vis[i][0] = 1;
    vis[i][m + 1] = 1;
  }
  for (int i = 0; i <= m + 1; i++) {
    a[0][i] = '*';
    vis[0][i] = 1;
    a[n + 1][i] = '*';
    vis[n + 1][i] = 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++)
      if (a[i][j] == '.')
        cou++;
      else
        vis[i][j] = 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '.' && vis[i][j] == 0 && enter(i, j)) {
        Pos t;
        t.x = i;
        t.y = j;
        q.push(t);
      }
    }
  }
  if (cou % 2 != 0)
    printf("Not unique\n");
  else
    bfs();
  return 0;
}
