#include <bits/stdc++.h>
using namespace std;
int n, m, id, jd, changes;
pair<int, int> o;
queue<pair<int, int> > q;
char c[2222][2222];
bool used[2222][2222];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      cin >> c[i][j];
      if (c[i][j] == '.') {
        q.push({i, j});
      }
    }
  }
  changes = 1;
  while (changes) {
    changes = 0;
    int cnt = q.size();
    for (int i = 1; i <= cnt; ++i) {
      int id = q.front().first, jd = q.front().second, u = 0;
      q.pop();
      if (used[id][jd]) {
        continue;
      }
      if (c[id - 1][jd] == '.') {
        u++;
        o = {id - 1, jd};
      }
      if (c[id][jd - 1] == '.') {
        u++;
        o = {id, jd - 1};
      }
      if (c[id + 1][jd] == '.') {
        u++;
        o = {id + 1, jd};
      }
      if (c[id][jd + 1] == '.') {
        u++;
        o = {id, jd + 1};
      }
      if (u == 1) {
        changes = 1;
        int ik = o.first, jk = o.second;
        if (ik > id) {
          c[ik][jk] = 'v';
          c[id][jd] = '^';
        }
        if (ik < id) {
          c[ik][jk] = '^';
          c[id][jd] = 'v';
        }
        if (jk < jd) {
          c[ik][jk] = '<';
          c[id][jd] = '>';
        }
        if (jk > jd) {
          c[ik][jk] = '>';
          c[id][jd] = '<';
        }
        used[ik][jk] = 1;
        used[id][jd] = 1;
        if (c[id + 1][jd] == '.') q.push({id + 1, jd});
        if (c[id - 1][jd] == '.') q.push({id - 1, jd});
        if (c[id][jd + 1] == '.') q.push({id, jd + 1});
        if (c[id][jd - 1] == '.') q.push({id, jd - 1});
        if (c[ik + 1][jk] == '.') q.push({ik + 1, jk});
        if (c[ik - 1][jk] == '.') q.push({ik - 1, jk});
        if (c[ik][jk + 1] == '.') q.push({ik, jk + 1});
        if (c[ik][jk - 1] == '.') q.push({ik, jk - 1});
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (c[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      cout << c[i][j];
    }
    cout << endl;
  }
}
