#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<pair<int, int> > forced;
string s[2000];
bool cover[2000][2000];
bool ok(int i, int j) {
  return i >= 0 && i < n && j >= 0 && j < m && s[i][j] == '.';
}
bool okay(int i, int j, int ii, int jj) { return ok(i, j) & ok(ii, jj); }
void put(int i, int j, int ii, int jj) {
  if (i == ii) {
    if (j > jj)
      s[i][j] = '>', s[ii][jj] = '<';
    else
      s[i][j] = '<', s[ii][jj] = '>';
  } else {
    if (i > ii)
      s[i][j] = 'v', s[ii][jj] = '^';
    else
      s[i][j] = '^', s[ii][jj] = 'v';
  }
  cover[i][j] = cover[ii][jj] = 1;
  vector<pair<int, int> > tmp(2);
  tmp[0] = {i, j};
  tmp[1] = {ii, jj};
  for (int kk = 0; kk < 2; ++kk) {
    int i = tmp[kk].first, j = tmp[kk].second;
    for (int di = -1; di < 2; ++di) {
      for (int dj = -1; dj < 2; ++dj) {
        if (abs(di) + abs(dj) < 2 && (di || dj)) {
          if (ok(i + di, j + dj)) tmp.push_back({i + di, j + dj});
        }
      }
    }
  }
  for (int kk = 0; kk < tmp.size(); ++kk) {
    int i = tmp[kk].first, j = tmp[kk].second;
    int cnt = 0;
    for (int di = -1; di < 2; ++di) {
      for (int dj = -1; dj < 2; ++dj) {
        if (abs(di) + abs(dj) < 2 && (di || dj)) {
          if (okay(i, j, i + di, j + dj)) cnt++;
        }
      }
    }
    if (cnt == 1) forced.push_back({i, j});
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    cin >> s[i];
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cover[i][j] = s[i][j] == '*';
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      int cnt = 0;
      for (int di = -1; di < 2; ++di) {
        for (int dj = -1; dj < 2; ++dj) {
          if (abs(di) + abs(dj) < 2 && (di || dj)) {
            if (okay(i, j, i + di, j + dj)) ++cnt;
          }
        }
      }
      if (cnt == 1) forced.push_back({i, j});
    }
  }
  while (forced.size()) {
    int i = forced.back().first, j = forced.back().second;
    forced.pop_back();
    for (int di = -1; di < 2; ++di) {
      for (int dj = -1; dj < 2; ++dj) {
        if (abs(di) + abs(dj) < 2 && (di || dj)) {
          if (okay(i, j, i + di, j + dj)) {
            put(i, j, i + di, j + dj);
          }
        }
      }
    }
  }
  bool ans = 1;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      ans &= cover[i][j];
    }
  }
  if (!ans) {
    cout << "Not unique\n";
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    cout << s[i] << "\n";
  }
  return 0;
}
