#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const long double EPS = 1e-14;
const int MAXN = 2005;
int N, M;
char field[MAXN][MAXN];
char ids[2][5] = {"><v^", "<>^v"};
int deg[MAXN][MAXN];
vector<pair<int, int> > bfs;
int DI[4] = {0, 0, 1, -1};
int DJ[4] = {1, -1, 0, 0};
int main() {
  int n, m;
  cin >> n >> m;
  N = n;
  M = m;
  getchar();
  for (int i = 0; i < int(n); i++) {
    scanf("%s", field[i]);
  }
  for (int i = 0; i < int(n); i++) {
    for (int j = 0; j < int(m); j++) {
      if (!(((i) < N && (i) >= 0 && (j) < M && (j) >= 0 &&
             field[(i)][(j)] == '.')))
        continue;
      deg[i][j] = 0;
      for (int k = 0; k < int(4); k++) {
        if (((i + DI[k]) < N && (i + DI[k]) >= 0 && (j + DJ[k]) < M &&
             (j + DJ[k]) >= 0 && field[(i + DI[k])][(j + DJ[k])] == '.')) {
          deg[i][j]++;
        }
      }
      if (deg[i][j] == 1) {
        bfs.push_back(make_pair(i, j));
      }
    }
  }
  for (int b = 0; b < int(bfs.size()); b++) {
    char good = false;
    int i = bfs[b].first, j = bfs[b].second;
    int ni, nj;
    int id;
    if (deg[i][j] == 0) continue;
    for (int k = 0; k < int(4); k++) {
      if (((i + DI[k]) < N && (i + DI[k]) >= 0 && (j + DJ[k]) < M &&
           (j + DJ[k]) >= 0 && field[(i + DI[k])][(j + DJ[k])] == '.')) {
        ni = i + DI[k];
        nj = j + DJ[k];
        id = k;
        good = true;
      }
    }
    if (!good) {
      cout << "Not unique";
      return 0;
    }
    field[i][j] = ids[1][id];
    field[i + DI[id]][j + DJ[id]] = ids[0][id];
    deg[i][j] = deg[i + DI[id]][j + DJ[id]] = 0;
    i = ni;
    j = nj;
    for (int k = 0; k < int(4); k++) {
      if (((i + DI[k]) < N && (i + DI[k]) >= 0 && (j + DJ[k]) < M &&
           (j + DJ[k]) >= 0 && field[(i + DI[k])][(j + DJ[k])] == '.')) {
        deg[i + DI[k]][j + DJ[k]]--;
        if (deg[i + DI[k]][j + DJ[k]] == 1)
          bfs.push_back(make_pair(i + DI[k], j + DJ[k]));
      }
    }
  }
  for (int i = 0; i < int(n); i++) {
    for (int j = 0; j < int(m); j++) {
      if (field[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
    }
  }
  for (int i = 0; i < int(n); i++) {
    puts(field[i]);
  }
}
