#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, -1, 0, 0}, dy[4] = {0, 0, 1, -1}, MAXN = 2e3 + 10;
const pair<int, int> sign[4] = {
    pair<int, int>('^', 'v'), pair<int, int>('v', '^'),
    pair<int, int>('<', '>'), pair<int, int>('>', '<')};
string s[MAXN];
int n, m;
inline bool onmap(int x, int y) { return (x >= 0 && x < n && y >= 0 && y < m); }
inline int getemp(int x, int y) {
  int ans = 0;
  for (int i = 0; i < 4; i++)
    if (onmap(x + dx[i], y + dy[i]) && s[x + dx[i]][y + dy[i]] == '.') ans++;
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> s[i];
  queue<pair<int, int> > q;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (getemp(i, j) == 1) {
        q.push(pair<int, int>(i, j));
      }
  while (q.size()) {
    int x = q.front().first, y = q.front().second;
    q.pop();
    if (s[x][y] != '.') continue;
    if (getemp(x, y) != 1) {
      cout << "Not unique";
      return 0;
    }
    for (int i = 0; i < 4; i++) {
      int x2 = dx[i] + x, y2 = dy[i] + y;
      if (onmap(x2, y2) && s[x2][y2] == '.') {
        s[x][y] = sign[i].first;
        s[x2][y2] = sign[i].second;
        for (int j = 0; j < 4; j++) {
          int x3 = x2 + dx[j], y3 = y2 + dy[j];
          if (onmap(x3, y3) && s[x3][y3] == '.' && getemp(x3, y3) == 1) {
            q.push(pair<int, int>(x3, y3));
          }
        }
        break;
      }
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (s[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
  for (int i = 0; i < n; i++) cout << s[i] << "\n";
}
