#include <bits/stdc++.h>
using namespace std;
template <class T>
bool uin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool uax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int N, M;
char s[2000][2001];
int d[2000][2000];
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
bool ok(int x, int y) { return 0 <= x && x < N && 0 <= y && y < M; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  scanf("%d%d", &N, &M);
  for (int i = 0; i < (int)(N); ++i) {
    scanf("%s", s[i]);
  }
  vector<pair<int, int> > q;
  int lft = 0;
  for (int i = 0; i < (int)(N); ++i)
    for (int j = 0; j < (int)(M); ++j) {
      if (s[i][j] == '*') continue;
      ++lft;
      for (int dd = 0; dd < (int)(4); ++dd) {
        int x = i + dx[dd], y = j + dy[dd];
        if (!ok(x, y)) continue;
        if (s[x][y] == '.') ++d[i][j];
      }
      if (d[i][j] == 1) {
        q.push_back(make_pair(i, j));
      }
    }
  int cur = 0;
  while (cur < q.size()) {
    int x = q[cur].first, y = q[cur].second;
    ++cur;
    if (d[x][y] != 1) {
      assert(d[x][y] == 0);
      continue;
    }
    for (int dd = 0; dd < (int)(4); ++dd) {
      int xx = x + dx[dd], yy = y + dy[dd];
      if (!ok(xx, yy) || d[xx][yy] == 0) continue;
      s[x][y] = "v>^<"[dd ^ 2];
      s[xx][yy] = "v>^<"[dd];
      lft -= 2;
      d[x][y] = d[xx][yy] = 0;
      for (int ddd = 0; ddd < (int)(4); ++ddd) {
        int xxx = xx + dx[ddd], yyy = yy + dy[ddd];
        if (!ok(xxx, yyy) || d[xxx][yyy] == 0) continue;
        if (--d[xxx][yyy] == 1) q.push_back(make_pair(xxx, yyy));
      }
      break;
    }
  }
  if (!lft) {
    for (int i = 0; i < (int)(N); ++i) printf("%s\n", s[i]);
  } else {
    printf("Not unique\n");
  }
  return 0;
}
