#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::string;
int main() {
  int n, m;
  cin >> n >> m;
  string* A = new string[n];
  int number_of_full_cells = 0;
  for (int i = 0; i < n; ++i) {
    cin >> A[i];
    for (int j = 0; j < m; ++j) {
      if (A[i][j] == '.') {
        number_of_full_cells++;
      }
    }
  }
  int** neighbors = new int*[n];
  for (int i = 0; i < n; ++i) {
    neighbors[i] = new int[m];
    for (int j = 0; j < m; ++j) {
      neighbors[i][j] = 0;
    }
  }
  int one_neighbor = 0;
  int zero_neighbors = 0;
  std::vector<std::pair<int, int> > cells_with_one_neighbor;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (A[i][j] == '*') {
        neighbors[i][j] = -1;
      } else {
        for (int dx = -1; dx <= 1; dx++) {
          for (int dy = -1; dy <= 1; dy++) {
            if (abs(dx) + abs(dy) == 1) {
              if (i + dx > -1 && i + dx < n && j + dy > -1 && j + dy < m) {
                if (A[i + dx][j + dy] == '.') {
                  neighbors[i][j]++;
                }
              }
            }
          }
        }
      }
      if (neighbors[i][j] == 1) {
        one_neighbor++;
        cells_with_one_neighbor.push_back(std::make_pair(i, j));
      }
      if (neighbors[i][j] == 0) {
        zero_neighbors++;
      }
    }
  }
  while (number_of_full_cells != 0) {
    if (zero_neighbors != 0 || one_neighbor == 0) {
      cout << "Not unique" << std::endl;
      return 0;
    } else {
      number_of_full_cells -= 2;
      while (
          neighbors[cells_with_one_neighbor[cells_with_one_neighbor.size() - 1]
                        .first]
                   [cells_with_one_neighbor[cells_with_one_neighbor.size() - 1]
                        .second] < 0) {
        cells_with_one_neighbor.pop_back();
      }
      int i = cells_with_one_neighbor[cells_with_one_neighbor.size() - 1].first;
      int j =
          cells_with_one_neighbor[cells_with_one_neighbor.size() - 1].second;
      cells_with_one_neighbor.pop_back();
      neighbors[i][j] = -1;
      int k = 0;
      int l = 0;
      for (int dx = -1; dx <= 1; dx++) {
        for (int dy = -1; dy <= 1; dy++) {
          if (abs(dx) + abs(dy) == 1) {
            if (i + dx > -1 && i + dx < n && j + dy > -1 && j + dy < m) {
              if (neighbors[i + dx][j + dy] > 0) {
                k = i + dx;
                l = j + dy;
              }
            }
          }
        }
      }
      if (k - i == 1) {
        A[i][j] = '^';
        A[k][l] = 'v';
      }
      if (i - k == 1) {
        A[i][j] = 'v';
        A[k][l] = '^';
      }
      if (l - j == 1) {
        A[i][j] = '<';
        A[k][l] = '>';
      }
      if (j - l == 1) {
        A[i][j] = '>';
        A[k][l] = '<';
      }
      if (neighbors[k][l] != 1) {
        one_neighbor--;
        for (int dx = -1; dx <= 1; dx++) {
          for (int dy = -1; dy <= 1; dy++) {
            if (abs(dx) + abs(dy) == 1) {
              if (k + dx > -1 && k + dx < n && l + dy > -1 && l + dy < m) {
                if (A[k + dx][l + dy] == '.') {
                  neighbors[k + dx][l + dy]--;
                  if (neighbors[k + dx][l + dy] == 1) {
                    one_neighbor++;
                    cells_with_one_neighbor.push_back(
                        std::make_pair(k + dx, l + dy));
                  }
                  if (neighbors[k + dx][l + dy] == 0) {
                    zero_neighbors++;
                  }
                }
              }
            }
          }
        }
      }
      if (neighbors[k][l] == 1) {
        one_neighbor -= 2;
      }
      neighbors[k][l] = -1;
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cout << A[i][j];
    }
    cout << std::endl;
  }
  return 0;
}
