#include <bits/stdc++.h>
using namespace std;
int n, m;
bool can(int i, int j) { return i < n && i >= 0 && j < m && j >= 0; }
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    string board[n];
    int neighbours[n][m];
    memset(neighbours, 0, sizeof(neighbours));
    for (int i = 0; i < n; i++) cin >> board[i];
    queue<pair<int, int> > fila;
    int countEmpty = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (board[i][j] == '.') {
          if (can(i - 1, j) && board[i - 1][j] == '.') neighbours[i][j]++;
          if (can(i + 1, j) && board[i + 1][j] == '.') neighbours[i][j]++;
          if (can(i, j - 1) && board[i][j - 1] == '.') neighbours[i][j]++;
          if (can(i, j + 1) && board[i][j + 1] == '.') neighbours[i][j]++;
          if (neighbours[i][j] == 1) fila.push(pair<int, int>(i, j));
          countEmpty++;
        }
      }
    }
    while (!fila.empty()) {
      int i = fila.front().first;
      int j = fila.front().second;
      fila.pop();
      if (neighbours[i][j] != 1) continue;
      countEmpty -= 2;
      if (can(i - 1, j) && board[i - 1][j] == '.') {
        board[i][j] = 'v';
        board[i - 1][j] = '^';
        neighbours[i - 1][j]--;
        i = i - 1;
      } else if (can(i + 1, j) && board[i + 1][j] == '.') {
        board[i][j] = '^';
        board[i + 1][j] = 'v';
        neighbours[i + 1][j]--;
        i = i + 1;
      } else if (can(i, j - 1) && board[i][j - 1] == '.') {
        board[i][j] = '>';
        board[i][j - 1] = '<';
        neighbours[i][j - 1]--;
        j = j - 1;
      } else if (can(i, j + 1) && board[i][j + 1] == '.') {
        board[i][j] = '<';
        board[i][j + 1] = '>';
        neighbours[i][j + 1]--;
        j = j + 1;
      }
      if (can(i - 1, j) && board[i - 1][j] == '.') {
        neighbours[i - 1][j]--;
        if (neighbours[i - 1][j] == 1) fila.push(pair<int, int>(i - 1, j));
      }
      if (can(i + 1, j) && board[i + 1][j] == '.') {
        neighbours[i + 1][j]--;
        if (neighbours[i + 1][j] == 1) fila.push(pair<int, int>(i + 1, j));
      }
      if (can(i, j - 1) && board[i][j - 1] == '.') {
        neighbours[i][j - 1]--;
        if (neighbours[i][j - 1] == 1) fila.push(pair<int, int>(i, j - 1));
      }
      if (can(i, j + 1) && board[i][j + 1] == '.') {
        neighbours[i][j + 1]--;
        if (neighbours[i][j + 1] == 1) fila.push(pair<int, int>(i, j + 1));
      }
    }
    if (countEmpty == 0) {
      for (int i = 0; i < n; i++) cout << board[i] << endl;
    } else {
      printf("Not unique\n");
    }
  }
  return 0;
}
