#include <bits/stdc++.h>
using namespace std;
vector<string> split(const string &s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.push_back(x);
  return v;
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << it->substr((*it)[0] == ' ', it->length()) << " = " << a << '\n';
  err(++it, args...);
}
const int MOD = 1000000007;
template <class T>
inline T tmin(T a, T b) {
  return (a < b) ? a : b;
}
template <class T>
inline T tmax(T a, T b) {
  return (a > b) ? a : b;
}
template <class T>
inline void amax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline void amin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
inline T tabs(T a) {
  return (a > 0) ? a : -a;
}
template <class T>
T gcd(T a, T b) {
  while (b != 0) {
    T c = a;
    a = b;
    b = c % b;
  }
  return a;
}
const int N = 2001;
int n, m;
char gr[N][N], ans[N][N];
int deg[N][N];
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
string c1 = "^v<>";
string c2 = "v^><";
inline bool inside(int x, int y) { return x >= 0 && x < n && y >= 0 && y < m; }
inline int thash(int x, int y) { return N * x + y; }
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (__typeof(0) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n)))
    cin >> gr[i];
  for (__typeof(0) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n)))
    for (__typeof(0) j = (0) - ((0) > (m)); j != (m) - ((0) > (m));
         j += 1 - 2 * ((0) > (m)))
      ans[i][j] = gr[i][j];
  memset(deg, 0, sizeof(deg));
  for (__typeof(0) x = (0) - ((0) > (n)); x != (n) - ((0) > (n));
       x += 1 - 2 * ((0) > (n)))
    for (__typeof(0) y = (0) - ((0) > (m)); y != (m) - ((0) > (m));
         y += 1 - 2 * ((0) > (m))) {
      if (gr[x][y] == '.') {
        for (__typeof(0) i = (0) - ((0) > (4)); i != (4) - ((0) > (4));
             i += 1 - 2 * ((0) > (4))) {
          int nx = x + dx[i], ny = y + dy[i];
          if (inside(nx, ny) && gr[nx][ny] == '.') deg[x][y]++;
        }
      }
    }
  queue<int> que;
  for (__typeof(0) x = (0) - ((0) > (n)); x != (n) - ((0) > (n));
       x += 1 - 2 * ((0) > (n)))
    for (__typeof(0) y = (0) - ((0) > (m)); y != (m) - ((0) > (m));
         y += 1 - 2 * ((0) > (m)))
      if (deg[x][y] == 1) que.push(thash(x, y));
  while (!que.empty()) {
    int p = que.front();
    que.pop();
    int x = p / N, y = p % N;
    if (deg[x][y] != 1) continue;
    for (__typeof(0) i = (0) - ((0) > (4)); i != (4) - ((0) > (4));
         i += 1 - 2 * ((0) > (4))) {
      int nx = x + dx[i], ny = y + dy[i];
      if (inside(nx, ny) && deg[nx][ny]) {
        ans[x][y] = c1[i];
        ans[nx][ny] = c2[i];
        deg[x][y] = deg[nx][ny] = 0;
        for (__typeof(0) j = (0) - ((0) > (4)); j != (4) - ((0) > (4));
             j += 1 - 2 * ((0) > (4))) {
          int mx = nx + dx[j], my = ny + dy[j];
          if (inside(mx, my) && deg[mx][my]) {
            deg[mx][my]--;
            if (deg[mx][my] == 1) que.push(thash(mx, my));
          }
        }
      }
    }
  }
  for (__typeof(0) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n)))
    for (__typeof(0) j = (0) - ((0) > (m)); j != (m) - ((0) > (m));
         j += 1 - 2 * ((0) > (m))) {
      if (ans[i][j] == '.') {
        printf("Not unique\n");
        return 0;
      }
    }
  for (__typeof(0) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n)))
    cout << ans[i] << "\n";
  return 0;
}
