#include <bits/stdc++.h>
using namespace std;
char Map[2005][2005];
queue<pair<int, int> > q;
int mox[4] = {-1, 0, 1, 0};
int moy[4] = {0, 1, 0, -1};
char cg[4] = {'v', '<', '^', '>'};
int n, m;
bool ispoint(int x, int y) {
  return (x >= 0 && x < n && y >= 0 && y < m && Map[x][y] == '.');
}
int deg(int x, int y) {
  int ans = 0;
  for (int i = 0; i < 4; i++) {
    int fx = x + mox[i];
    int fy = y + moy[i];
    if (ispoint(fx, fy)) ans++;
  }
  return ans;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) scanf("%s", Map[i]);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (ispoint(i, j) && deg(i, j) == 1) {
        pair<int, int> p = make_pair(i, j);
        q.push(p);
      }
    }
  while (!q.empty()) {
    pair<int, int> p = q.front();
    q.pop();
    int x, y, fx, fy;
    x = p.first;
    y = p.second;
    for (int i = 0; i < 4; i++) {
      fx = x + mox[i];
      fy = y + moy[i];
      if (ispoint(fx, fy)) {
        Map[x][y] = cg[i];
        Map[fx][fy] = cg[i ^ 2];
        for (int i = 0; i < 4; i++) {
          int ffx = fx + mox[i];
          int ffy = fy + moy[i];
          if (ispoint(ffx, ffy) && deg(ffx, ffy) == 1)
            q.push(make_pair(ffx, ffy));
        }
        break;
      }
    }
  }
  int flag = 0;
  for (int i = 0; i < n && !flag; i++)
    for (int j = 0; j < m && !flag; j++)
      if (Map[i][j] == '.') flag = 1;
  if (flag == 1)
    printf("Not unique\n");
  else {
    for (int i = 0; i < n; i++, printf("\n"))
      for (int j = 0; j < m; j++) printf("%c", Map[i][j]);
  }
  return 0;
}
