#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<char> > a(n, vector<char>(m));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  int x[4] = {0, 1, -1, 0};
  int y[4] = {1, 0, 0, -1};
  char temp[4] = {'<', '^', 'v', '>'};
  vector<vector<int> > deg(n, vector<int>(m, 0));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '*') continue;
      for (int k = 0; k < 4; k++) {
        int ix = i + x[k];
        int iy = j + y[k];
        if (ix >= 0 && iy >= 0 && ix < n && iy < m && a[ix][iy] == '.') {
          deg[i][j]++;
        }
      }
    }
  }
  queue<pair<int, int> > q;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (deg[i][j] == 1) q.push({i, j});
    }
  }
  vector<vector<char> > ans(n, vector<char>(m, '*'));
  while (!q.empty()) {
    int i = q.front().first, j = q.front().second;
    q.pop();
    if (a[i][j] == '*') continue;
    int i_new = -1, j_new = -1;
    for (int k = 0; k < 4; k++) {
      int ix = i + x[k];
      int iy = j + y[k];
      if (ix >= 0 && iy >= 0 && ix < n && iy < m && a[ix][iy] == '.') {
        ans[i][j] = temp[k];
        ans[ix][iy] = temp[3 - k];
        a[i][j] = '*';
        a[ix][iy] = '*';
        i_new = ix, j_new = iy;
        break;
      }
    }
    if (i_new == -1) {
      cout << "Not unique";
      return 0;
    }
    for (int k = 0; k < 4; k++) {
      int ix = i_new + x[k];
      int iy = j_new + y[k];
      if (ix >= 0 && iy >= 0 && ix < n && iy < m && a[ix][iy] == '.') {
        deg[ix][iy]--;
        if (deg[ix][iy] == 1) q.push({ix, iy});
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << ans[i][j];
    }
    cout << endl;
  }
}
