#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<vector<char>> vec(2001, vector<char>(2001));
queue<pair<int, int>> q;
int valid(int x, int y) {
  if (x >= n || y >= m || x < 0 || y < 0 || vec[x][y] != '.') return 0;
  return 1;
}
void func(int x, int y) {
  if (valid(x + 1, y) + valid(x - 1, y) + valid(x, y + 1) + valid(x, y - 1) ==
      1) {
    q.push({x, y});
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  int count = 0;
  for (long long int i = 0; i <= n - 1; i++) {
    for (long long int j = 0; j <= m - 1; j++) {
      cin >> vec[i][j];
      if (vec[i][j] == '.') {
        count++;
      }
    }
  }
  if (count % 2) {
    cout << "Not unique";
    return 0;
  }
  for (long long int i = 0; i <= n - 1; i++) {
    for (long long int j = 0; j <= m - 1; j++) {
      func(i, j);
    }
  }
  while (q.empty() == false) {
    pair<int, int> t = q.front();
    q.pop();
    int x = t.first;
    int y = t.second;
    if (valid(x, y)) {
      if (valid(x + 1, y)) {
        vec[x][y] = '^';
        vec[x + 1][y] = 'v';
        func(x + 2, y);
        func(x + 1, y - 1);
        func(x + 1, y + 1);
      } else if (valid(x - 1, y)) {
        vec[x][y] = 'v';
        vec[x - 1][y] = '^';
        func(x - 2, y);
        func(x - 1, y - 1);
        func(x - 1, y + 1);
      } else if (valid(x, y + 1)) {
        vec[x][y] = '<';
        vec[x][y + 1] = '>';
        func(x + 1, y + 1);
        func(x, y + 2);
        func(x - 1, y + 1);
      } else if (valid(x, y - 1)) {
        vec[x][y] = '>';
        vec[x][y - 1] = '<';
        func(x + 1, y - 1);
        func(x, y - 2);
        func(x - 1, y - 1);
      } else {
        cout << "Not unique" << endl;
        return 0;
      }
    }
  }
  for (long long int i = 0; i <= n - 1; i++) {
    for (long long int j = 0; j <= m - 1; j++) {
      if (vec[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
    }
  }
  for (long long int i = 0; i <= n - 1; i++) {
    for (long long int j = 0; j <= m - 1; j++) {
      cout << vec[i][j];
    }
    cout << endl;
  }
}
