#include <bits/stdc++.h>
using namespace std;
char gra[2020][2020];
int degree[2020][2020];
int row, clo, cnt;
int Move[4][2] = {{0, 1}, {0, -1}, {-1, 0}, {1, 0}};
char charA[4] = {'<', '>', 'v', '^'};
char charB[4] = {'>', '<', '^', 'v'};
int getDegree(int x, int y) {
  int sum = 0;
  cnt++;
  for (int i = 0; i < 4; i++) {
    int newx = x + Move[i][0];
    int newy = y + Move[i][1];
    sum += (gra[newx][newy] == '.');
  }
  return sum;
}
void solve() {
  queue<pair<int, int> > que;
  for (int i = 1; i <= row; i++)
    for (int j = 1; j <= clo; j++) {
      if (gra[i][j] != '.') continue;
      degree[i][j] = getDegree(i, j);
      if (degree[i][j] == 1) que.push(make_pair(i, j));
    }
  pair<int, int> tem;
  while (!que.empty()) {
    tem = que.front();
    int nowx = tem.first;
    int nowy = tem.second;
    que.pop();
    for (int i = 0; i < 4; i++) {
      int tex = nowx + Move[i][0];
      int tey = nowy + Move[i][1];
      if (gra[tex][tey] == '.') {
        degree[nowx][nowy] = 0;
        degree[tex][tey] = 0;
        gra[nowx][nowy] = charA[i];
        gra[tex][tey] = charB[i];
        cnt -= 2;
        for (int k = 0; k < 4; k++) {
          int ttx = tex + Move[k][0];
          int tty = tey + Move[k][1];
          if (gra[ttx][tty] == '.') degree[ttx][tty]--;
          if (degree[ttx][tty] == 1) que.push(make_pair(ttx, tty));
        }
      }
    }
  }
  if (cnt)
    printf("Not unique\n");
  else
    for (int i = 1; i <= row; i++) puts(gra[i] + 1);
}
int main() {
  scanf("%d %d", &row, &clo);
  cnt = 0;
  getchar();
  for (int i = 1; i <= row; i++) gets(gra[i] + 1);
  memset(degree, 0, sizeof(degree));
  solve();
  return 0;
}
