#include <bits/stdc++.h>
using namespace std;
void _R(int &x) { scanf("%d", &x); }
void _R(long long &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void _W(const int &x) { printf("%d", x); }
void _W(const long long &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
const int MAX_SIZE = 2003;
int dr[4] = {1, 0, -1, 0}, dc[4] = {0, 1, 0, -1};
char type[2][5] = {"^<v>", "v>^<"};
char A[MAX_SIZE][MAX_SIZE] = {};
int deg[MAX_SIZE][MAX_SIZE] = {};
pair<int, int> bfs[MAX_SIZE * MAX_SIZE];
int main() {
  int N, M;
  scanf("%d%d", &N, &M);
  for (int i = 0; i < (N); ++i) {
    scanf("%s", (A[i + 1] + 1));
  }
  int start = 0;
  int end = 0;
  for (int r = 0; r < (N + 1); ++r) {
    for (int c = 0; c < (M + 1); ++c) {
      for (int k = 0; k < (4); ++k) {
        int nr = r + dr[k];
        int nc = c + dc[k];
        if (A[nr][nc] == '.') {
          deg[r][c] += 1;
        }
      }
      if (A[r][c] == '.' && deg[r][c] == 1) {
        bfs[end] = {r, c};
        end += 1;
      }
    }
  }
  while (start < end) {
    int r = bfs[start].first, c = bfs[start].second;
    start += 1;
    if (A[r][c] != '.') {
      continue;
    }
    int nr = 0;
    int nc = 0;
    for (int k = 0; k < (4); ++k) {
      nr = r + dr[k];
      nc = c + dc[k];
      if (A[nr][nc] == '.') {
        A[r][c] = type[0][k];
        A[nr][nc] = type[1][k];
        deg[r][c] = 0;
        deg[nr][nc] = 0;
        break;
      }
    }
    for (int k = 0; k < (4); ++k) {
      int nnr = nr + dr[k];
      int nnc = nc + dc[k];
      deg[nnr][nnc] -= 1;
      if (A[nnr][nnc] == '.' && deg[nnr][nnc] == 1) {
        bfs[end] = {nnr, nnc};
        end += 1;
      }
    }
  }
  for (int r = (1); r < (N + 1); ++r) {
    for (int c = (1); c < (M + 1); ++c) {
      if (A[r][c] == '.') {
        cout << "Not unique" << endl;
        return 0;
      }
    }
  }
  for (int r = (1); r < (N + 1); ++r) {
    for (int c = (1); c < (M + 1); ++c) {
      cout << A[r][c];
    }
    cout << endl;
  }
  return 0;
}
