#include <bits/stdc++.h>
using namespace std;
char grid[2010][2010];
int deg[2010][2010];
int n, m, ct, rm, cm, x, y;
int dy[4] = {0, -1, 0, 1};
int dx[4] = {1, 0, -1, 0};
char ss[2][8] = {"^>v<", "v<^>"};
queue<pair<int, int>> q;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int r = 1; r <= n; ++r) {
    for (int c = 1; c <= m; ++c) {
      cin >> grid[r][c];
      if (grid[r][c] == '.') ct++;
    }
  }
  for (int r = 1; r <= n; ++r) {
    for (int c = 1; c <= m; ++c) {
      if (grid[r][c] == '.') {
        for (int k = 0; k < 4; ++k) {
          rm = r + dx[k], cm = c + dy[k];
          if (grid[rm][cm] == '.') deg[r][c]++;
        }
        if (deg[r][c] == 1) q.push({r, c});
      }
    }
  }
  while (!q.empty()) {
    x = q.front().first;
    y = q.front().second;
    q.pop();
    if (grid[x][y] == '.') {
      int xx, yy, id = -1;
      bool dot = false;
      for (int k = 0; k < 4; ++k) {
        xx = x + dx[k], yy = y + dy[k];
        id = k;
        if (grid[xx][yy] == '.') {
          dot = true;
          break;
        }
      }
      if (!dot) {
        cout << "Not unique\n";
        return 0;
      }
      grid[x][y] = ss[0][id];
      grid[xx][yy] = ss[1][id];
      deg[x][y] = 0;
      deg[xx][yy] = 0;
      for (int k = 0; k < 4; ++k) {
        int nnx = xx + dx[k];
        int nny = yy + dy[k];
        deg[nnx][nny]--;
        if (deg[nnx][nny] == 1) q.push({nnx, nny});
      }
    }
  }
  for (int r = 1; r <= n; ++r) {
    for (int c = 1; c <= m; ++c) {
      if (grid[r][c] == '.') {
        cout << "Not unique\n";
        return 0;
      }
    }
  }
  for (int x = 1; x <= n; ++x) {
    for (int y = 1; y <= m; ++y) {
      cout << grid[x][y];
    }
    cout << "\n";
  }
  return 0;
}
