#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); }
int main() {
  int N, M;
  _R(N);
  _R(M);
  char A[N][M];
  int B[N][M];
  for (int i = 0; i < (N); ++i) {
    char s[M];
    _R(s);
    for (int j = 0; j < (M); ++j) {
      A[i][j] = s[j];
      B[i][j] = 4;
    }
  }
  char ans[N][M];
  vector<vector<int> > neighbor = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
  for (int i = 0; i < (N); ++i) {
    for (int j = 0; j < (M); ++j) {
      ans[i][j] = A[i][j];
      if (i == 0) {
        B[i][j] -= 1;
      }
      if (i == N - 1) {
        B[i][j] -= 1;
      }
      if (j == 0) {
        B[i][j] -= 1;
      }
      if (j == M - 1) {
        B[i][j] -= 1;
      }
      if (A[i][j] == '*') {
        B[i][j] = 0;
        for (auto point : neighbor) {
          int x = i + point[0], y = j + point[1];
          if (x >= 0 && x < N && y >= 0 && y < M) {
            B[x][y] -= 1;
          }
        }
        continue;
      }
    }
  }
  vector<pair<int, int> > stack;
  for (int i = 0; i < (N); ++i) {
    for (int j = 0; j < (M); ++j) {
      if (B[i][j] == 1) {
        stack.push_back({i, j});
      }
    }
  }
  while (!stack.empty()) {
    pair<int, int> p = stack.back();
    int i = p.first, j = p.second;
    stack.pop_back();
    if (B[i][j] != 1) {
      continue;
    }
    int a = 0, b = 0;
    for (auto point : neighbor) {
      int x = i + point[0], y = j + point[1];
      if (x >= 0 && x < N && y >= 0 && y < M) {
        if (B[x][y] > 0) {
          a = x;
          b = y;
          B[i][j] = 0;
          B[x][y] = 0;
        }
      }
    }
    for (auto point : neighbor) {
      int x = a + point[0], y = b + point[1];
      if (x >= 0 && x < N && y >= 0 && y < M) {
        B[x][y] -= 1;
        if (B[x][y] == 1) {
          stack.push_back({x, y});
        }
      }
    }
    if (i == a) {
      if (j < b) {
        ans[i][j] = '<';
        ans[a][b] = '>';
      } else {
        ans[i][j] = '>';
        ans[a][b] = '<';
      }
    }
    if (j == b) {
      if (i < a) {
        ans[i][j] = '^';
        ans[a][b] = 'v';
      } else {
        ans[i][j] = 'v';
        ans[a][b] = '^';
      }
    }
  }
  for (int i = 0; i < (N); ++i) {
    for (int j = 0; j < (M); ++j) {
      if (ans[i][j] == '.') {
        cout << "Not unique" << endl;
        return 0;
      }
    }
  }
  for (int i = 0; i < (N); ++i) {
    for (int j = 0; j < (M); ++j) {
      cout << ans[i][j];
    }
    cout << endl;
  }
  return 0;
}
