#include <bits/stdc++.h>
using namespace std;
int checkUnique(vector<string>& a, int r, int c) {
  int n = a.size();
  int m = a[0].length();
  if (r < 0 || r >= n || c < 0 || c >= m) {
    return -1;
  }
  if (a[r][c] != '.') {
    return -1;
  }
  int dots = 0;
  if (r + 1 < n) {
    if (a[r + 1][c] == '.') {
      dots++;
    }
  }
  if (r - 1 >= 0) {
    if (a[r - 1][c] == '.') {
      dots++;
    }
  }
  if (c + 1 < m) {
    if (a[r][c + 1] == '.') {
      dots++;
    }
  }
  if (c - 1 >= 0) {
    if (a[r][c - 1] == '.') {
      dots++;
    }
  }
  return dots;
}
pair<int, int> setTiles(vector<string>& a, int r, int c) {
  int n = a.size();
  int m = a[0].length();
  if (r + 1 < n && a[r + 1][c] == '.') {
    a[r][c] = '^';
    a[r + 1][c] = 'v';
    return {r + 1, c};
  }
  if (r - 1 >= 0 && a[r - 1][c] == '.') {
    a[r][c] = 'v';
    a[r - 1][c] = '^';
    return {r - 1, c};
  }
  if (c + 1 < m && a[r][c + 1] == '.') {
    a[r][c] = '<';
    a[r][c + 1] = '>';
    return {r, c + 1};
  }
  if (c - 1 >= 0 && a[r][c - 1] == '.') {
    a[r][c] = '>';
    a[r][c - 1] = '<';
    return {r, c - 1};
  }
  return {n, m};
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<string> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int size = n * m;
  int stars = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '*') stars++;
    }
  }
  int tiles = size - stars;
  if (tiles & 1) {
    cout << "Not unique";
    return 0;
  }
  queue<pair<int, int>> q;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '.') {
        int dots = checkUnique(a, i, j);
        if (dots == 0) {
          cout << "Not unique";
          return 0;
        }
        if (dots == 1) {
          q.push({i, j});
        }
      }
    }
  }
  while (!q.empty()) {
    auto front = q.front();
    q.pop();
    int x = front.first;
    int y = front.second;
    if (a[x][y] == '.') {
      auto p = setTiles(a, x, y);
      if (p.first == n && p.second == m) {
        cout << "Not unique";
        return 0;
      }
      x = p.first;
      y = p.second;
      int dots = checkUnique(a, x + 1, y);
      if (dots == 0) {
        cout << "Not unique";
        return 0;
      } else if (dots == 1) {
        q.push({x + 1, y});
      }
      int dots2 = checkUnique(a, x - 1, y);
      if (dots2 == 0) {
        cout << "Not unique";
        return 0;
      } else if (dots2 == 1) {
        q.push({x - 1, y});
      }
      int dots3 = checkUnique(a, x, y + 1);
      if (dots3 == 0) {
        cout << "Not unique";
        return 0;
      } else if (dots3 == 1) {
        q.push({x, y + 1});
      }
      int dots4 = checkUnique(a, x, y - 1);
      if (dots4 == 0) {
        cout << "Not unique";
        return 0;
      } else if (dots4 == 1) {
        q.push({x, y - 1});
      }
    }
  }
  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 << a[i][j];
    }
    cout << endl;
  }
  return 0;
}
