#include <bits/stdc++.h>
using namespace std;
const int N = 2010, dx[] = {-1, 0, 0, 1}, dy[] = {0, -1, 1, 0};
int n, m, d[N][N];
char s[N][N];
queue<pair<int, int>> q;
void red(int x, int y) {
  d[x][y]--;
  if (d[x][y] == 1) q.push({x, y});
}
void work(int x0, int y0, int x1, int y1, char c0, char c1) {
  s[x0][y0] = c0;
  s[x1][y1] = c1;
  for (int i = 0; i < 4; i++)
    red(x0 + dx[i], y0 + dy[i]), red(x1 + dx[i], y1 + dy[i]);
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (s[i][j] == '.')
        d[i - 1][j]++, d[i][j - 1]++, d[i][j + 1]++, d[i + 1][j]++;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (d[i][j] == 1) q.push({i, j});
  while (!q.empty()) {
    int x = q.front().first, y = q.front().second;
    q.pop();
    if (s[x][y] != '.' || d[x][y] != 1) continue;
    if (s[x - 1][y] == '.')
      work(x, y, x - 1, y, 'v', '^');
    else if (s[x][y - 1] == '.')
      work(x, y, x, y - 1, '>', '<');
    else if (s[x][y + 1] == '.')
      work(x, y, x, y + 1, '<', '>');
    else
      work(x, y, x + 1, y, '^', 'v');
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (s[i][j] == '.') {
        printf("Not unique");
        return 0;
      }
  for (int i = 1; i <= n; i++) printf("%s\n", s[i] + 1);
  return 0;
}
