#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 * 100 + 10;
const int mod = 1e9 + 7;
int n, m;
vector<vector<char> > field;
int dx[4] = {-1, 1, 0, 0};
int dy[4] = {0, 0, -1, 1};
int cntn(int i, int j) {
  int res = 0;
  for (int k = 0; k < 4; k++) {
    int ii = i + dx[k], jj = j + dy[k];
    if ((0 <= ii) && (ii < n) && (0 <= jj) && (jj < m))
      res += (field[ii][jj] == '.');
  }
  return res;
}
void dfs(int i, int j) {
  pair<int, int> cur;
  int kk;
  for (int k = 0; k < 4; k++) {
    int ii = i + dx[k], jj = j + dy[k];
    if ((0 <= ii) && (ii < n) && (0 <= jj) && (jj < m)) {
      if (field[ii][jj] == '.') {
        kk = k;
        cur = make_pair(ii, jj);
        break;
      }
    }
  }
  if (kk == 0) {
    field[i][j] = 'v';
    field[cur.first][cur.second] = '^';
  } else if (kk == 1) {
    field[i][j] = '^';
    field[cur.first][cur.second] = 'v';
  } else if (kk == 2) {
    field[i][j] = '>';
    field[cur.first][cur.second] = '<';
  } else {
    field[i][j] = '<';
    field[cur.first][cur.second] = '>';
  }
  for (int k = 0; k < 4; k++) {
    int ii = cur.first + dx[k], jj = cur.second + dy[k];
    if ((0 <= ii) && (ii < n) && (0 <= jj) && (jj < m))
      if (field[ii][jj] == '.')
        if (cntn(ii, jj) == 1) dfs(ii, jj);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  getchar();
  field.assign(n, vector<char>(m, '#'));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) scanf("%c", &field[i][j]);
    getchar();
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (field[i][j] != '.') continue;
      if (cntn(i, j) == 0) {
        puts("Not unique");
        return 0;
      }
      if (cntn(i, j) == 1) {
        dfs(i, j);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (field[i][j] == '.') {
        puts("Not unique");
        return 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%c", field[i][j]);
    puts("");
  }
  return 0;
}
