#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5;
char second[N][N], AH[4] = {'v', '<', '^', '>'};
int n, m, l, r, JHT[2][4];
pair<int, int> Q[N * N];
char get(char c) {
  if (c == 'v') return ('^');
  if (c == '^') return ('v');
  if (c == '<') return ('>');
  return ('<');
}
bool aya(int x, int y) {
  return (x >= 0 && x < n && y >= 0 && y < m && second[x][y] == '.');
}
int T(int x, int y) {
  int rt = 0;
  for (int i = 0; i < 4; i++)
    if (aya(x + JHT[0][i], y + JHT[1][i])) rt++;
  return (rt);
}
int main() {
  JHT[0][0] = -1;
  JHT[0][2] = 1;
  JHT[1][1] = 1;
  JHT[1][3] = -1;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", &second[i]);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (aya(i, j) && T(i, j) == 1) Q[r++] = {i, j};
  while (l ^ r) {
    pair<int, int> px = Q[l++];
    int x = px.first, y = px.second;
    for (int i = 0; i < 4; i++) {
      int xx = x + JHT[0][i], yy = y + JHT[1][i];
      if (!aya(xx, yy)) continue;
      second[x][y] = AH[i];
      second[xx][yy] = get(AH[i]);
      for (int j = 0; j < 4; j++) {
        int a = xx + JHT[0][j], b = yy + JHT[1][j];
        if (aya(a, b) && T(a, b) == 1) Q[r++] = {a, b};
      }
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (second[i][j] == '.') return !printf("Not unique");
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%c", second[i][j]);
    printf("\n");
  }
}
