#include <bits/stdc++.h>
using namespace std;
int mid(int i, int j) { return (i + j) >> 1; }
int left(int i) { return i << 1; }
int right(int i) { return (i << 1) + 1; }
char a[2000 + 1][2000 + 1];
int n;
int m;
bool vis[2000 + 1][2000 + 1];
int degree[2000 + 1][2000 + 1];
struct com {
  bool operator()(pair<pair<int, int>, int> a, pair<pair<int, int>, int> b) {
    return a.second > b.second;
  }
};
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", a[i]);
  memset(vis, 0, sizeof vis);
  priority_queue<pair<pair<int, int>, int>, vector<pair<pair<int, int>, int> >,
                 com>
      q;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '.') {
        degree[i][j] = 0;
        if (i - 1 >= 0 && a[i - 1][j] == '.') degree[i][j]++;
        if (i + 1 < n && a[i + 1][j] == '.') degree[i][j]++;
        if (j - 1 >= 0 && a[i][j - 1] == '.') degree[i][j]++;
        if (j + 1 < m && a[i][j + 1] == '.') degree[i][j]++;
        q.push(make_pair(make_pair(i, j), degree[i][j]));
      }
    }
  }
  while (!q.empty()) {
    pair<pair<int, int>, int> p = q.top();
    q.pop();
    int i = p.first.first;
    int j = p.first.second;
    int d = p.second;
    if (vis[i][j]) continue;
    if (d != 1) {
      cout << "Not unique";
      return 0;
    }
    int r, w;
    if (i - 1 >= 0 && a[i - 1][j] == '.') {
      r = i - 1;
      w = j;
      a[i - 1][j] = '^';
      a[i][j] = 'v';
    } else if (i + 1 < n && a[i + 1][j] == '.') {
      r = i + 1;
      w = j;
      a[i][j] = '^';
      a[i + 1][j] = 'v';
    } else if (j - 1 >= 0 && a[i][j - 1] == '.') {
      r = i;
      w = j - 1;
      a[i][j - 1] = '<';
      a[i][j] = '>';
    } else if (j + 1 < m && a[i][j + 1] == '.') {
      r = i;
      w = j + 1;
      a[i][j] = '<';
      a[i][j + 1] = '>';
    }
    vis[i][j] = 1;
    vis[r][w] = 1;
    if (r - 1 >= 0 && a[r - 1][w] == '.') {
      degree[r - 1][w]--;
      q.push(make_pair(make_pair(r - 1, w), degree[r - 1][w]));
    }
    if (r + 1 < n && a[r + 1][w] == '.') {
      degree[r + 1][w]--;
      q.push(make_pair(make_pair(r + 1, w), degree[r + 1][w]));
    }
    if (w - 1 >= 0 && a[r][w - 1] == '.') {
      degree[r][w - 1]--;
      q.push(make_pair(make_pair(r, w - 1), degree[r][w - 1]));
    }
    if (w + 1 < m && a[r][w + 1] == '.') {
      degree[r][w + 1]--;
      q.push(make_pair(make_pair(r, w + 1), degree[r][w + 1]));
    }
  }
  for (int i = 0; i < n; i++) {
    printf("%s\n", a[i]);
  }
}
