#include <bits/stdc++.h>
using namespace std;
const int maxn = 2010;
char arr[maxn][maxn];
int v[maxn][maxn];
int m, n;
int to;
const int dx[] = {-1, 1, 0, 0};
const int dy[] = {0, 0, -1, 1};
void f(int x, int y) {
  int k = 0;
  while (arr[x + dx[k]][y + dy[k]] != '.') {
    k++;
  }
  int i = x + dx[k];
  int j = y + dy[k];
  if (i == x) {
    if (j > y) {
      arr[i][j] = '>';
      arr[x][y] = '<';
    } else {
      arr[i][j] = '<';
      arr[x][y] = '>';
    }
  } else if (i > x) {
    arr[i][j] = 'v';
    arr[x][y] = '^';
  } else {
    arr[i][j] = '^';
    arr[x][y] = 'v';
  }
  to -= 2;
  v[i][j]--;
  for (k = 0; k < 4; k++) v[i + dx[k]][j + dy[k]]--;
  for (k = 0; k < 4; k++) {
    if (arr[i + dx[k]][j + dy[k]] == '.' && v[i + dx[k]][j + dy[k]] == 1)
      f(i + dx[k], j + dy[k]);
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    getchar();
    for (int j = 1; j <= m; j++)
      if ((arr[i][j] = getchar()) == '.') {
        to++;
        v[i - 1][j]++;
        v[i + 1][j]++;
        v[i][j - 1]++;
        v[i][j + 1]++;
      }
  }
  for (int i = 0; i <= n + 1; i++)
    for (int j = 0; j <= m + 1; j++)
      if (arr[i][j] != '.') v[i][j] = -1;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (v[i][j] == 1 && arr[i][j] == '.') f(i, j);
  if (to)
    cout << "Not unique" << endl;
  else {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) printf("%c", arr[i][j]);
      putchar(10);
    }
  }
  return 0;
}
