#include <bits/stdc++.h>
using namespace std;
int T, t, n, m, sum;
char s[2010][2010];
bool vis[2010][2010];
bool flag;
queue<int> qu;
void find(int i, int j) {
  int k;
  k = vis[i - 1][j] + vis[i + 1][j] + vis[i][j - 1] + vis[i][j + 1];
  if (k == 4) {
    flag = true;
    return;
  } else if (k == 3)
    qu.push(i * 3000 + j);
}
void solve2(int i, int j) {
  if (vis[i - 1][j] == 0) find(i - 1, j);
  if (vis[i + 1][j] == 0) find(i + 1, j);
  if (vis[i][j - 1] == 0) find(i, j - 1);
  if (vis[i][j + 1] == 0) find(i, j + 1);
}
void debug() {
  for (int i = 0; i <= n + 1; i++) printf("%s\n", s[i]);
}
void solve() {
  int i, j, k;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  for (i = 0; i <= n + 1; i++) s[i][0] = s[i][m + 1] = '*';
  for (i = 0; i <= m + 1; i++) s[0][i] = s[n + 1][i] = '*';
  for (i = 0; i <= n + 1; i++)
    for (j = 0; j <= m + 1; j++)
      if (s[i][j] == '*') {
        vis[i][j] = 1;
        sum++;
      }
  sum = sum - n * 2 - m * 2 - 4;
  if ((n * m - sum) & 1) {
    flag = true;
    return;
  }
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (vis[i][j] == 0) {
        k = vis[i - 1][j] + vis[i + 1][j] + vis[i][j - 1] + vis[i][j + 1];
        if (k == 4) {
          flag = true;
          return;
        } else if (k == 3)
          qu.push(i * 3000 + j);
      }
  while (!qu.empty()) {
    if (flag) return;
    k = qu.front();
    qu.pop();
    i = k / 3000;
    j = k % 3000;
    if (vis[i][j]) continue;
    if (vis[i - 1][j] == 0) {
      vis[i][j] = vis[i - 1][j] = 1;
      s[i][j] = 'v';
      s[i - 1][j] = '^';
      solve2(i, j);
      solve2(i - 1, j);
    } else if (vis[i + 1][j] == 0) {
      vis[i][j] = vis[i + 1][j] = 1;
      s[i][j] = '^';
      s[i + 1][j] = 'v';
      solve2(i, j);
      solve2(i + 1, j);
    } else if (vis[i][j - 1] == 0) {
      vis[i][j] = vis[i][j - 1] = 1;
      s[i][j] = '>';
      s[i][j - 1] = '<';
      solve2(i, j);
      solve2(i, j - 1);
    } else if (vis[i][j + 1] == 0) {
      vis[i][j] = vis[i][j + 1] = 1;
      s[i][j] = '<';
      s[i][j + 1] = '>';
      solve2(i, j);
      solve2(i, j + 1);
    }
    sum += 2;
  }
  if (sum != n * m) flag = true;
}
int main() {
  int i, j, k;
  flag = false;
  solve();
  if (flag)
    printf("Not unique\n");
  else {
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= m; j++) printf("%c", s[i][j]);
      printf("\n");
    }
  }
}
