#include <bits/stdc++.h>
using namespace std;
string ans;
int A[3] = {0};
char D[2005][2005];
vector<int> G[4194304];
vector<int> L;
int hsh(int A, int B) { return (A << 11) | B; }
int main() {
  int N, M;
  scanf("%d%d", &N, &M);
  for (int i = 0; i < N; i++) scanf("%s", D[i]);
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      if (D[i][j] == '.' && D[i + 1][j] == '.') {
        G[hsh(i, j)].push_back(hsh(i + 1, j));
        G[hsh(i + 1, j)].push_back(hsh(i, j));
      }
      if (D[i][j] == '.' && D[i][j + 1] == '.') {
        G[hsh(i, j)].push_back(hsh(i, j + 1));
        G[hsh(i, j + 1)].push_back(hsh(i, j));
      }
    }
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      if (G[hsh(i, j)].size() == 1) L.push_back(hsh(i, j));
    }
  }
  while (!L.empty()) {
    if (G[L.back()].empty()) {
      L.pop_back();
      continue;
    }
    int ad = L.back(), en = G[L.back()][0];
    L.pop_back();
    if (D[ad >> 11][ad & 2047] != '.' || D[en >> 11][en & 2047] != '.')
      continue;
    for (int i = 0; i < G[en].size(); i++) {
      if (G[en][i] == ad) {
        G[en][i] = G[en].back();
        G[en].pop_back();
        break;
      }
    }
    for (int i = 0; i < G[en].size(); i++) {
      int ad = G[en][i];
      for (int j = 0; j < G[ad].size(); j++) {
        if (G[ad][j] == en) {
          G[ad][j] = G[ad].back();
          G[ad].pop_back();
          if (G[ad].size() == 1) L.push_back(ad);
          break;
        }
      }
    }
    if (ad > en) swap(ad, en);
    if (ad >> 11 == en >> 11)
      D[ad >> 11][ad & 2047] = '<', D[en >> 11][en & 2047] = '>';
    else
      D[ad >> 11][ad & 2047] = '^', D[en >> 11][en & 2047] = 'v';
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      if (D[i][j] == '.') return !printf("Not unique");
    }
  }
  for (int i = 0; i < N; i++) {
    printf("%s\n", D[i]);
  }
  return 0;
}
