#include <bits/stdc++.h>
using namespace std;
char s[2005][2005];
bool vis[2005][2005];
bool chk[2005][2005];
int deg[2005][2005];
int n, m;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, -1, 0, 1};
int idx(int r, int c) { return r * m + c; }
int nxt[2005][2005];
vector<int> v[5];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", s[i]);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (s[i][j] == '.') vis[i][j] = 1;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (s[i][j] == '.') {
        int u = 0;
        for (int k = 0; k < 4; k++) {
          int ii = i + dx[k], jj = j + dy[k];
          if (ii < 0 || ii >= n) continue;
          if (jj < 0 || jj >= m) continue;
          if (s[ii][jj] == '*') continue;
          u++;
        }
        deg[i][j] = u;
        v[u].push_back(idx(i, j));
      }
  pair<int, int> rpt, tpt;
  bool flag = 0;
  if (!v[0].empty()) {
    puts("Not unique");
    return 0;
  }
  while (!v[1].empty()) {
    int k = v[1].back();
    v[1].pop_back();
    int i = k / m, j = k % m;
    if (chk[i][j]) continue;
    for (int k = 0; k < 4; k++) {
      int ii = i + dx[k], jj = j + dy[k];
      if (ii < 0 || ii >= n) continue;
      if (jj < 0 || jj >= m) continue;
      if (s[ii][jj] == '*') continue;
      if (chk[ii][jj]) continue;
      chk[ii][jj] = 1;
      chk[i][j] = 1;
      nxt[i][j] = k;
      nxt[ii][jj] = (k & 1) ? 4 - k : 2 - k;
      for (int kk = 0; kk < 4; kk++) {
        int iii = ii + dx[kk], jjj = jj + dy[kk];
        if (iii < 0 || iii >= n) continue;
        if (jjj < 0 || jjj >= m) continue;
        if (s[iii][jjj] == '*') continue;
        if (chk[iii][jjj]) continue;
        deg[iii][jjj]--;
        if (deg[iii][jjj] == 0) {
          puts("Not unique");
          return 0;
        } else if (deg[iii][jjj] == 1) {
          v[1].push_back(idx(iii, jjj));
        }
      }
    }
  }
  for (int i = 2; i <= 4; i++) {
    for (int j = 0; j < v[i].size(); j++) {
      int ii = v[i][j] / m, jj = v[i][j] % m;
      if (!chk[ii][jj]) {
        puts("Not unique");
        return 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '*')
        putchar('*');
      else {
        if (nxt[i][j] == 0)
          putchar('v');
        else if (nxt[i][j] == 1)
          putchar('>');
        else if (nxt[i][j] == 2)
          putchar('^');
        else if (nxt[i][j] == 3)
          putchar('<');
      }
    }
    putchar('\n');
  }
  return 0;
}
