#include <bits/stdc++.h>
using namespace std;
char a[2005][2005];
int deg[2005][2005];
pair<int, int> temp[2005 * 2005];
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
char t[2][8] = {"^<v>", "v>^<"};
int main() {
  int n, m, i, j, k, l = 0, r = 0;
  cin >> n >> m;
  for (i = 0; i < n; i++) {
    scanf("%s", &a[i]);
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      for (k = 0; k < 4; k++) {
        int nx = i + dx[k];
        int ny = j + dy[k];
        if (a[nx][ny] == '.') deg[i][j]++;
      }
      if (a[i][j] == '.') {
        if (deg[i][j] == 1) temp[r++] = make_pair(i, j);
      }
    }
  }
  while (l < r) {
    int x = temp[l].first;
    int y = temp[l].second;
    int f = 0, id, nx, ny;
    if (a[x][y] == '.') {
      for (k = 0; k < 4; k++) {
        nx = x + dx[k];
        ny = y + dy[k];
        id = k;
        if (a[nx][ny] == '.') {
          f = 1;
          break;
        }
      }
      if (!f) {
        printf("Not unique");
        return 0;
      }
      a[x][y] = t[0][id];
      a[nx][ny] = t[1][id];
      deg[x][y] = 0;
      deg[nx][ny] = 0;
      for (k = 0; k < 4; k++) {
        int nnx = nx + dx[k];
        int nny = ny + dy[k];
        deg[nnx][nny]--;
        if (deg[nnx][nny] == 1) temp[r++] = make_pair(nnx, nny);
      }
    }
    l++;
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (a[i][j] == '.') {
        printf("Not unique\n");
        return 0;
      }
    }
  }
  for (i = 0; i < n; i++) printf("%s\n", a[i]);
  return 0;
}
