#include <bits/stdc++.h>
const long long inf = 0x3f3f3f3f3f3f3f3LL;
const long long mod = (long long)1e9 + 7;
using namespace std;
template <class T, class T2>
void smin(T& a, T2 val) {
  if (a > val) a = val;
}
template <class T, class T2>
void smax(T& a, T2 val) {
  if (a < val) a = val;
}
const long long N = 2e3 + 10;
long long n, m;
const long long dx[4] = {-1, 0, 1, 0};
const long long dy[4] = {0, 1, 0, -1};
vector<vector<char>> a;
bool valid(long long x, long long y) {
  return x >= 0 and y >= 0 and x < n and y < m;
}
void no() {
  cout << "Not unique";
  exit(0);
}
queue<array<long long, 2>> q;
array<long long, 2> getAdj(long long i, long long j) {
  long long adj = 0;
  for (long long k = 0; k < 4; ++k) {
    long long ni = i + dx[k];
    long long nj = j + dy[k];
    if (valid(ni, nj) and a[ni][nj] == '.') {
      ++adj;
    }
  }
  if (adj == 1) {
    return {i, j};
  } else {
    return {-1, -1};
  }
}
void okay(long long i, long long j) {
  for (long long k = 0; k < 4; ++k) {
    long long ni = i + dx[k];
    long long nj = j + dy[k];
    if (valid(ni, nj) and a[ni][nj] == '.') {
      array<long long, 2> ans = getAdj(ni, nj);
      if (ans[0] != -1) {
        ;
        q.push({ans[0], ans[1]});
      }
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m;
  a.resize(n);
  for (long long i = 0; i < n; ++i) {
    a[i].resize(m);
    for (long long j = 0; j < m; ++j) {
      cin >> a[i][j];
    }
  }
  long long stars = 0, dots = 0;
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < m; ++j) {
      if (a[i][j] == '*') {
        stars++;
        continue;
      }
      dots++;
      long long adj = 0;
      for (long long k = 0; k < 4; ++k) {
        long long ni = i + dx[k];
        long long nj = j + dy[k];
        if (valid(ni, nj) and a[ni][nj] == '.') {
          ++adj;
        }
      }
      if (adj == 1) {
        q.push({i, j});
        ;
      }
    }
  }
  if (q.empty()) {
    if (!dots) {
      for (long long i = 0; i < n; ++i) {
        for (long long j = 0; j < m; ++j) {
          cout << a[i][j];
        }
        cout << '\n';
      }
      exit(0);
    } else {
      no();
    }
  }
  vector<vector<bool>> seen(n, vector<bool>(m));
  while (!q.empty()) {
    auto X = q.front();
    q.pop();
    long long x = X[0], y = X[1];
    if (seen[x][y]) {
      continue;
    }
    seen[x][y] = 1;
    for (long long k = 0; k < 4; ++k) {
      long long nx = x + dx[k];
      long long ny = y + dy[k];
      if (valid(nx, ny) and a[nx][ny] == '.') {
        if (k == 3) {
          a[x][y] = '>';
          a[nx][ny] = '<';
          (okay(nx, ny));
        } else if (k == 0) {
          a[x][y] = 'v';
          a[nx][ny] = '^';
          (okay(nx, ny));
        } else if (k == 1) {
          ;
          a[x][y] = '<';
          a[nx][ny] = '>';
          (okay(nx, ny));
        } else {
          a[x][y] = '^';
          a[nx][ny] = 'v';
          (okay(nx, ny));
        }
        assert(a[nx][ny] != '.');
        seen[nx][ny] = 1;
      }
    };
  }
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < m; ++j) {
      if (a[i][j] == '.') {
        ;
        no();
      }
    }
  }
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < m; ++j) {
      cout << a[i][j];
    }
    cout << '\n';
  }
  return 0;
}
