#include <bits/stdc++.h>
using namespace std;
string arr[2048];
int dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0};
int n, m, cnt;
void dfs(int x, int y) {
  if (!((x) >= 0 && (x) < (n)) || !((y) >= 0 && (y) < (m)) ||
      arr[x][y] != '.') {
    return;
  }
  int way = -1, sum = 0;
  for (int i = 0; i < 4; i++) {
    int newx = x + dx[i];
    int newy = y + dy[i];
    if (((newx) >= 0 && (newx) < (n)) && ((newy) >= 0 && (newy) < (m)) &&
        arr[newx][newy] == '.') {
      sum++;
      way = i;
    }
  }
  if (sum == 1) {
    if (!way) {
      arr[x][y] = '<';
      arr[x][y + 1] = '>';
    } else if (way == 1) {
      arr[x][y] = '>';
      arr[x][y - 1] = '<';
    } else if (way == 2) {
      arr[x][y] = '^';
      arr[x + 1][y] = 'v';
    } else if (way == 3) {
      arr[x][y] = 'v';
      arr[x - 1][y] = '^';
    }
    cnt += 2;
    for (int i = 0; i < 4; i++) {
      dfs(x + dx[way] + dx[i], y + dy[way] + dy[i]);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    for (int j = 0; j < m; j++) {
      if (arr[i][j] == '*') {
        cnt++;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      dfs(i, j);
    }
  }
  if (cnt == n * m) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        cout << arr[i][j];
      }
      cout << endl;
    }
  } else {
    cout << "Not unique" << endl;
  }
  return 0;
}
