#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2000 + 1;
int n, m;
char s[MAX_N][MAX_N];
char deg[MAX_N * MAX_N];
int mate[MAX_N * MAX_N];
int fnd;
int at = 0;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
int mat(int i, int j) { return (i - 1) * MAX_N + (j - 1) + 1; }
int y(int i) {
  --i;
  return (i % MAX_N) + 1;
}
int x(int i) {
  --i;
  return (i / MAX_N) + 1;
}
int S[10];
inline void getSons(const int id) {
  const int i = x(id), j = y(id);
  S[0] = 0;
  for (int k = 0; k < 4; ++k) {
    const int nx = i + dx[k], ny = j + dy[k];
    if (nx < 0 || ny < 0 || nx > n || ny > m) continue;
    if (s[nx][ny] != '.') continue;
    const int a = mat(i, j), b = mat(nx, ny);
    S[++S[0]] = b;
  }
}
void formGraph() {
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (s[i][j] == '*') continue;
      for (int k = 0; k < 4; ++k) {
        const int nx = i + dx[k], ny = j + dy[k];
        if (nx < 0 || ny < 0 || nx > n || ny > m) continue;
        if (s[nx][ny] != '.') continue;
        int a = mat(i, j), b = mat(nx, ny);
        if (!(a < b)) continue;
        deg[a]++;
        deg[b]++;
      }
      int a = mat(i, j);
      if (deg[a] == 1) {
        mate[++mate[0]] = a;
      }
    }
  }
}
int Q[MAX_N * MAX_N];
int lo = 1, hi = 0;
void clear() {
  lo = 1;
  hi = 0;
}
void push(const int val) {
  ++hi;
  Q[hi] = val;
}
int front() { return Q[lo]; }
void pop() { ++lo; }
bool empty() { return lo > hi; }
void BFS() {
  int nod;
  while (!empty()) {
    nod = front();
    pop();
    getSons(nod);
    if (!mate[nod]) {
      for (int i = 1; i <= S[0]; ++i) {
        const int son = S[i];
        if (mate[son]) continue;
        deg[son]--;
        deg[nod]--;
        push(son);
        mate[son] = nod;
        mate[nod] = son;
      }
    } else {
      for (int i = 1; i <= S[0]; ++i) {
        const int son = S[i];
        if (mate[son]) continue;
        deg[son]--;
        if (deg[son] == 1) push(son);
      }
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> (s[i] + 1);
  at = mat(n, m);
  formGraph();
  clear();
  for (int i = 1; i <= mate[0]; ++i) {
    push(mate[i]);
    mate[i] = 0;
  }
  mate[0] = 0;
  BFS();
  for (int i = 1; i <= at; ++i) {
    if (s[x(i)][y(i)] != '.') continue;
    int p = mate[i];
    if (!p) {
      cout << "Not unique";
      return 0;
    }
    if (x(i) == x(p) + 1) {
      s[x(i)][y(i)] = 'v';
      s[x(i) - 1][y(i)] = '^';
    } else if (x(i) == x(p) - 1) {
      s[x(i)][y(i)] = '^';
      s[x(i) + 1][y(i)] = 'v';
    } else if (y(p) == y(i) - 1) {
      s[x(i)][y(i)] = '>';
      s[x(i)][y(i) - 1] = '<';
    } else {
      s[x(i)][y(i)] = '<';
      s[x(i)][y(i) + 1] = '>';
    }
  }
  for (int i = 1; i <= n; ++i) {
    cout << (s[i] + 1) << "\n";
  }
  return 0;
}
