#include <bits/stdc++.h>
using namespace std;
int R, C;
char g[2200][2200];
bool seen[2200][2200];
int dr[] = {0, 0, 1, -1};
int dc[] = {1, -1, 0, 0};
bool rip(int r, int c) {
  return r < 0 || c < 0 || r >= R || c >= C || g[r][c] != '.';
}
bool force(int r, int c) {
  int cnt = 0;
  for (int i = 0; i < (4); i++)
    if (!rip(r + dr[i], c + dc[i])) cnt++;
  return cnt == 1;
}
int dir(int r, int c) {
  for (int i = 0; i < (4); i++)
    if (!rip(r + dr[i], c + dc[i])) return i;
  return -1;
}
queue<pair<int, int>> q;
int main() {
  scanf("%d %d\n", &R, &C);
  for (int r = 0; r < (R); r++) scanf("%s\n", g[r]);
  for (int r = 0; r < (R); r++)
    for (int c = 0; c < (C); c++)
      if (force(r, c)) q.push({r, c});
  while (q.size()) {
    int r = q.front().first;
    int c = q.front().second;
    q.pop();
    if (seen[r][c] || rip(r, c) || !force(r, c)) continue;
    seen[r][c] = 1;
    int d = dir(r, c);
    if (d == 0) {
      g[r][c] = '<';
      g[r][c + 1] = '>';
    } else if (d == 1) {
      g[r][c] = '>';
      g[r][c - 1] = '<';
    } else if (d == 2) {
      g[r][c] = '^';
      g[r + 1][c] = 'v';
    } else if (d == 3) {
      g[r][c] = 'v';
      g[r - 1][c] = '^';
    }
    for (int i = 0; i < (4); i++) {
      q.push({r + dr[i], c + dc[i]});
      q.push({r + dr[d] + dr[i], c + dc[d] + dc[i]});
    }
  }
  for (int r = 0; r < (R); r++)
    for (int c = 0; c < (C); c++)
      if (g[r][c] == '.') {
        puts("Not unique");
        return 0;
      }
  for (int r = 0; r < (R); r++) {
    for (int c = 0; c < (C); c++) printf("%c", g[r][c]);
    puts("");
  }
  return 0;
}
