#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
int dir[4][2] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
char maze[maxn][maxn];
pair<int, int> p[maxn * maxn];
int n, m;
char ch[4] = {'v', '<', '^', '>'};
bool check(int x, int y) {
  if (x >= 0 && x < n && y >= 0 && y < m && maze[x][y] == '.') {
    return true;
  } else {
    return false;
  }
}
int cal(int x, int y) {
  int ans = 0;
  for (int i = 0; i < 4; i++) {
    int dx = x + dir[i][0];
    int dy = y + dir[i][1];
    if (check(dx, dy)) ans++;
  }
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", maze[i]);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (check(i, j) && cal(i, j) == 1) {
        p[cnt++] = make_pair(i, j);
      }
    }
  }
  int h = 0;
  for (; h < cnt; h++) {
    int x = p[h].first, y = p[h].second;
    for (int i = 0; i < 4; i++) {
      int dx = x + dir[i][0];
      int dy = y + dir[i][1];
      if (check(dx, dy)) {
        maze[x][y] = ch[i];
        maze[dx][dy] = ch[i ^ 2];
        for (int j = 0; j < 4; j++) {
          int fx = dx + dir[j][0];
          int fy = dy + dir[j][1];
          if (check(fx, fy) && cal(fx, fy) == 1) {
            p[cnt++] = make_pair(fx, fy);
          }
        }
        break;
      }
    }
  }
  int ok = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (maze[i][j] == '.') {
        ok = 0;
        break;
      }
    }
    if (!ok) break;
  }
  if (ok) {
    for (int i = 0; i < n; i++) {
      printf("%s\n", maze[i]);
    }
  } else {
    printf("Not unique\n");
  }
}
