#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2002 * 2002;
bool a[MAXN], mark[MAXN];
int deg[MAXN], ix[] = {0, 1, 0, -1}, iy[] = {1, 0, -1, 0}, n, m;
char ans[MAXN];
queue<int> q;
inline int st(int x, int y) { return x * 2001 + y; }
inline pair<int, int> deSt(int p) { return make_pair(p / 2001, p % 2001); }
inline void solve(pair<int, int> a, pair<int, int> b) {
  if (a > b) swap(a, b);
  if (a.first < b.first)
    ans[st(a.first, a.second)] = '^', ans[st(b.first, b.second)] = 'v';
  else
    ans[st(a.first, a.second)] = '<', ans[st(b.first, b.second)] = '>';
}
inline bool isInside(pair<int, int> a) {
  if (a.first < 0 || a.second < 0 || a.first >= n || a.second >= m)
    return false;
  return true;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    char s[2002];
    scanf("%s", s);
    for (int j = 0; j < m; j++) {
      if (s[j] == '.') a[st(i, j)] = 1;
      ans[st(i, j)] = s[j];
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (!a[st(i, j)]) continue;
      for (int k = 0; k < 4; k++) {
        int x = i + ix[k], y = j + iy[k];
        if (isInside(make_pair(x, y)) && a[st(x, y)]) deg[st(i, j)]++;
      }
      if (deg[st(i, j)] == 1) q.push(st(i, j));
    }
  while (q.size()) {
    auto x = q.front();
    q.pop();
    if (mark[x]) continue;
    mark[x] = true;
    bool flag = false;
    int i = deSt(x).first, j = deSt(x).second;
    for (int k = 0; k < 4; k++) {
      int y = st(i + ix[k], j + iy[k]);
      auto p = deSt(x), p2 = deSt(y);
      if (isInside(p2) && a[y]) {
        if (!mark[y]) {
          mark[y] = flag = true;
          solve(p, p2);
          for (int k = 0; k < 4; k++) {
            int t = st(p2.first + ix[k], p2.second + iy[k]);
            if (isInside(deSt(t)) && a[t]) {
              deg[t]--;
              if (deg[t] == 1) q.push(t);
            }
          }
        }
      }
    }
    if (!flag) {
      printf("Not unique");
      return 0;
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (mark[st(i, j)] != a[st(i, j)]) {
        printf("Not unique");
        return 0;
      }
  for (int i = 0; i < n; i++, printf("\n"))
    for (int j = 0; j < m; j++) printf("%c", ans[st(i, j)]);
  return 0;
}
