#include <bits/stdc++.h>
using namespace std;
template <class T>
bool Maximize(T &v, T nv) {
  if (nv > v) return v = nv, 1;
  return 0;
}
template <class T>
bool Minimize(T &v, T nv) {
  if (nv < v) return v = nv, 1;
  return 0;
}
template <class T>
T Mod(T &v, T mod) {
  return v = (v % mod + mod) % mod;
}
const long long INFLL = numeric_limits<long long>::max();
const int INF = numeric_limits<int>::max(), N = 2e3 + 1;
const int di[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const char *re[4] = {"<>", "^v", "><", "v^"};
int h, w;
char m[N][N];
queue<int> q;
bool inBounds(int y, int x) { return y >= 0 && y < h && x >= 0 && x < w; }
void check(int y, int x) {
  if (m[y][x] != '.') return;
  int cnt = 0;
  for (int i = 0; i < 4; ++i) {
    int nx = x + di[i][0];
    int ny = y + di[i][1];
    cnt += inBounds(ny, nx) && m[ny][nx] == '.';
  }
  if (cnt == 1) q.push(y), q.push(x);
}
void checkNeighbours(int y, int x) {
  for (int i = 0; i < 4; ++i) {
    int nx = x + di[i][0];
    int ny = y + di[i][1];
    if (inBounds(ny, nx)) check(ny, nx);
  }
}
void solve() {
  scanf("%d %d", &h, &w);
  int dots = 0;
  for (int y = 0; y < h; ++y) {
    getchar();
    for (int x = 0; x < w; ++x) {
      m[y][x] = getchar();
      dots += m[y][x] == '.';
    }
  }
  for (int y = 0; y < h; ++y) {
    for (int x = 0; x < w; ++x) {
      check(y, x);
    }
  }
  while (!q.empty()) {
    int y = q.front();
    q.pop();
    int x = q.front();
    q.pop();
    for (int i = 0; i < 4; ++i) {
      int nx = x + di[i][0];
      int ny = y + di[i][1];
      if (inBounds(ny, nx) && m[ny][nx] == '.') {
        m[y][x] = re[i][0];
        m[ny][nx] = re[i][1];
        dots -= 2;
        checkNeighbours(ny, nx);
        checkNeighbours(y, x);
        break;
      }
    }
  }
  if (!dots) {
    for (int y = 0; y < h; ++y) {
      for (int x = 0; x < w; ++x) {
        putchar(m[y][x]);
      }
      putchar('\n');
    }
  } else {
    printf("Not unique\n");
  }
}
void init() {}
int main() {
  init();
  solve();
  return 0;
}
