#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-11;
int n, m;
char c[2020][2020];
bool fail = 0;
void make(int i, int j) {
  if (c[i - 1][j] != '.' && c[i + 1][j] != '.' && c[i][j - 1] != '.') {
    if (c[i][j + 1] != '.')
      fail = 1;
    else
      c[i][j] = '<', c[i][j + 1] = '>';
  } else if (c[i - 1][j] != '.' && c[i + 1][j] != '.' && c[i][j + 1] != '.') {
    if (c[i][j - 1] != '.')
      fail = 1;
    else
      c[i][j - 1] = '<', c[i][j] = '>';
  } else if (c[i][j - 1] != '.' && c[i][j + 1] != '.' && c[i - 1][j] != '.') {
    if (c[i + 1][j] != '.')
      fail = 1;
    else
      c[i][j] = '^', c[i + 1][j] = 'v';
  } else if (c[i][j - 1] != '.' && c[i][j + 1] != '.' && c[i + 1][j] != '.') {
    if (c[i - 1][j] != '.')
      fail = 1;
    else
      c[i - 1][j] = '^', c[i][j] = 'v';
  }
}
void pr() {
  for (int i = 0; i < (n); i++) {
    for (int j = 0; j < (m); j++) printf("%c", c[i + 1][j + 1]);
    printf("\n");
  }
}
int main() {
  cout << setiosflags(ios::fixed) << setprecision(10);
  scanf("%d %d\n", &n, &m);
  for (int i = 0; i < (2020); i++)
    for (int j = 0; j < (2020); j++) c[i][j] = '*';
  for (int i = 0; i < (n); i++) {
    for (int j = 0; j < (m); j++) scanf("%c", &c[i + 1][j + 1]);
    scanf("\n");
  }
  for (int k = 0; k < (10); k++)
    for (int i = 0; i < (max(n, m) + 1); i++) {
      for (int j = 0; j < (i + 1); j++) {
        if (c[i - j + 1][j + 1] == '.') make(i - j + 1, j + 1);
        if (m - j > 0 && n - (i - j) > 0 && c[n - (i - j)][m - (j)] == '.')
          make(n - (i - j), m - (j));
        if (n - (i - j) > 0 && c[n - (i - j)][j + 1] == '.' && n - (i - j) > 0)
          make(n - (i - j), j + 1);
        if (m - j > 0 && c[i - j + 1][m - j] == '.' && m - j > 0)
          make(i - j + 1, m - j);
      }
    }
  for (int i = 0; i < (n + 2); i++)
    for (int j = 0; j < (m + 2); j++)
      if (c[i][j] == '.') fail = 1;
  if (fail) {
    cout << "Not unique";
    return 0;
  }
  pr();
  return 0;
}
