#include <bits/stdc++.h>
using namespace std;
int width, length;
char a[2001][2001];
bool b[2001][2001] = {0}, check = 0;
void test(int i, int m) {
  int flag = 0, direction, k = 4;
  if (i - 1 > 0)
    if (b[i - 1][m] == 1)
      flag++;
    else
      direction = 4;
  else
    k--;
  if (i + 1 <= length)
    if (b[i + 1][m] == 1)
      flag++;
    else
      direction = 1;
  else
    k--;
  if (m + 1 <= width)
    if (b[i][m + 1] == 1)
      flag++;
    else
      direction = 2;
  else
    k--;
  if (m - 1 > 0)
    if (b[i][m - 1] == 1)
      flag++;
    else
      direction = 3;
  else
    k--;
  if (flag == k) {
    check = 1;
    return;
  }
  if (flag == k - 1) {
    int o, l;
    b[i][m] = 1;
    if (direction == 1) {
      a[i][m] = '^';
      a[i + 1][m] = 'v';
      b[i + 1][m] = 1;
      o = i + 1;
      l = m;
    } else if (direction == 2) {
      a[i][m] = '<';
      a[i][m + 1] = '>';
      b[i][m + 1] = 1;
      o = i;
      l = m + 1;
    } else if (direction == 3) {
      a[i][m] = '>';
      a[i][m - 1] = '<';
      b[i][m - 1] = 1;
      o = i;
      l = m - 1;
    } else {
      a[i][m] = 'v';
      a[i - 1][m] = '^';
      b[i - 1][m] = 1;
      o = i - 1;
      l = m;
    }
    if (o + 1 <= length && (!b[o + 1][l])) test(o + 1, l);
    if (!b[o - 1][l] && o > 1) test(o - 1, l);
    if (!b[o][l + 1] && l + 1 <= width) test(o, l + 1);
    if (!b[o][l - 1] && l > 1) test(o, l - 1);
  }
}
int main() {
  cin >> length >> width;
  for (int i = 1; i <= length; i++)
    for (int m = 1; m <= width; m++) {
      cin >> a[i][m];
      if (a[i][m] == '*') b[i][m] = 1;
    }
  for (int i = 1; i <= length; i++)
    for (int m = 1; m <= width; m++) {
      if (b[i][m] == 0) {
        test(i, m);
      }
    }
  for (int i = 1; i <= length && check == 0; i++)
    for (int m = 1; m <= width && check == 0; m++)
      if (b[i][m] == 0) {
        check = 1;
      }
  if (check)
    cout << "Not unique";
  else
    for (int i = 1; i <= length; i++) {
      for (int m = 1; m <= width; m++) cout << a[i][m];
      cout << endl;
    }
  return 0;
}
