#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
char s[N][N];
int n, m;
int dir[4][2] = {0, 1, 0, -1, 1, 0, -1, 0};
bool visit[N][N];
queue<int> q;
pair<int, int> nodes[N * N], stk[2][N * N];
int d[N][N];
bool in(int first, int second) {
  return first >= 0 && first < n && second >= 0 && second < m &&
         s[first][second] == '.';
}
bool bfs(int first, int second) {
  queue<int> q;
  q.push(first);
  q.push(second);
  int odd = 0, even = 0;
  visit[first][second] = true;
  int e = 0;
  while (!q.empty()) {
    first = q.front();
    q.pop();
    second = q.front();
    q.pop();
    visit[first][second] = 1;
    nodes[++e] = make_pair(first, second);
    if (first % 2 == second % 2)
      odd++;
    else
      even++;
    for (int i = 0; i < 4; i++) {
      int tx = first + dir[i][0];
      int ty = second + dir[i][1];
      if (in(tx, ty) && !visit[tx][ty]) {
        q.push(tx);
        q.push(ty);
        visit[tx][ty] = true;
      }
    }
  }
  if (odd != even) return false;
  int cnt[5];
  memset(cnt, 0, sizeof(cnt));
  for (int i = 1; i <= e; i++) {
    int deg = 0;
    for (int j = 0; j < 4; j++) {
      int tx = nodes[i].first + dir[j][0];
      int ty = nodes[i].second + dir[j][1];
      if (in(tx, ty)) deg++;
    }
    ++cnt[deg];
    if (deg == 1) stk[deg][cnt[deg]] = nodes[i];
    d[nodes[i].first][nodes[i].second] = deg;
  }
  if (cnt[1] == 0) return false;
  int tot = 0;
  for (int i = 1; i <= cnt[1]; i++) {
    pair<int, int> u = stk[1][i];
    if (s[u.first][u.second] != '.') continue;
    tot += 2;
    for (int j = 0; j < 4; j++) {
      int tx = u.first + dir[j][0];
      int ty = u.second + dir[j][1];
      if (!in(tx, ty)) continue;
      if (u.first == tx) {
        s[u.first][min(ty, u.second)] = '<';
        s[u.first][max(ty, u.second)] = '>';
      } else {
        s[max(tx, u.first)][ty] = 'v';
        s[min(tx, u.first)][ty] = '^';
      }
      --d[tx][ty];
      if (d[tx][ty] == 1) stk[1][++cnt[1]] = make_pair(tx, ty);
      for (int k = 0; k < 4; k++) {
        int xx = tx + dir[k][0];
        int yy = ty + dir[k][1];
        if (in(xx, yy)) {
          d[xx][yy]--;
          if (d[xx][yy] == 1) stk[1][++cnt[1]] = make_pair(xx, yy);
        }
      }
    }
  }
  return tot == e;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", s[i]);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (s[i][j] == '.') {
        bool only = bfs(i, j);
        if (!only) {
          printf("Not unique\n");
          return 0;
        }
      }
  for (int i = 0; i < n; i++) printf("%s\n", s[i]);
  return 0;
}
