#include <bits/stdc++.h>
using namespace std;
int N, M;
char ar[2010][2010];
inline void f(int k, int l) {
  if (k < 1 || l < 1 || k > N || l > M) return;
  if (ar[k][l] != '.') return;
  int res = 0;
  if (k + 1 <= N && ar[k + 1][l] == '.') res++;
  if (k - 1 >= 1 && ar[k - 1][l] == '.') res++;
  if (l + 1 <= M && ar[k][l + 1] == '.') res++;
  if (l - 1 >= 1 && ar[k][l - 1] == '.') res++;
  if (res == 1) {
    if (k + 1 <= N && ar[k + 1][l] == '.') {
      ar[k][l] = '^';
      ar[k + 1][l] = 'v';
    }
    if (k - 1 >= 1 && ar[k - 1][l] == '.') {
      ar[k - 1][l] = '^';
      ar[k][l] = 'v';
    }
    if (l + 1 <= M && ar[k][l + 1] == '.') {
      ar[k][l] = '<';
      ar[k][l + 1] = '>';
    }
    if (l - 1 >= 1 && ar[k][l - 1] == '.') {
      ar[k][l - 1] = '<';
      ar[k][l] = '>';
    }
    for (int i = -2; i <= 2; i++)
      for (int j = -2; j <= 2; j++) f(k + i, l + j);
  }
}
int main() {
  cin >> N >> M;
  for (int i = 1; i <= N; i++) scanf(" %s", ar[i] + 1);
  for (int i = 1; i <= N; i++)
    for (int j = 1; j <= M; j++) f(i, j);
  for (int i = 1; i <= N; i++)
    for (int j = 1; j <= M; j++)
      if (ar[i][j] == '.') {
        printf("Not unique\n");
        return 0;
      }
  for (int i = 1; i <= N; i++) printf("%s\n", ar[i] + 1);
}
