#include <bits/stdc++.h>
using namespace std;
int n, m;
char field[2001][2001], ans[2001][2001];
int d[2001][2001];
int m1[5] = {0, 1, -1, 0, 0}, m2[5] = {0, 0, 0, 1, -1};
bool used[2001][2001];
queue<int> q1, q2;
void init() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", &field[i]);
  for (int i = 1, x, y; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (field[i][j - 1] == '.') {
        for (int k = 1; k <= 4; k++) {
          x = i + m1[k];
          y = j + m2[k];
          if (field[x][y - 1] == '.') {
            d[i][j]++;
          }
        }
        if (d[i][j] == 1 && (!used[i][j])) {
          for (int k = 1; k <= 4; k++) {
            int t1 = i + m1[k], t2 = j + m2[k];
            if (field[t1][t2 - 1] == '.' && (!used[t1][t2])) {
              q1.push(t1);
              q2.push(t2);
              used[i][j] = used[t1][t2] = true;
              if (i < t1) {
                ans[i][j] = '^';
                ans[t1][t2] = 'v';
              }
              if (i > t1) {
                ans[i][j] = 'v';
                ans[t1][t2] = '^';
              }
              if (j < t2) {
                ans[i][j] = '<';
                ans[t1][t2] = '>';
              }
              if (j > t2) {
                ans[i][j] = '>';
                ans[t1][t2] = '<';
              }
              break;
            }
          }
        }
      }
  while (!q1.empty()) {
    int h1 = q1.front(), h2 = q2.front();
    q1.pop();
    q2.pop();
    for (int k = 1; k <= 4; k++) {
      int t1 = h1 + m1[k], t2 = h2 + m2[k];
      if (field[t1][t2 - 1] == '.' && (!used[t1][t2])) {
        d[t1][t2]--;
        if (d[t1][t2] == 1) {
          for (int j = 1; j <= 4; j++) {
            int p1 = t1 + m1[j], p2 = t2 + m2[j];
            if (field[p1][p2 - 1] == '.' && (!used[p1][p2])) {
              q1.push(p1);
              q2.push(p2);
              used[t1][t2] = used[p1][p2] = true;
              if (p1 < t1) {
                ans[p1][p2] = '^';
                ans[t1][t2] = 'v';
              }
              if (p1 > t1) {
                ans[p1][p2] = 'v';
                ans[t1][t2] = '^';
              }
              if (p2 < t2) {
                ans[p1][p2] = '<';
                ans[t1][t2] = '>';
              }
              if (p2 > t2) {
                ans[p1][p2] = '>';
                ans[t1][t2] = '<';
              }
              break;
            }
          }
        }
      }
    }
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (field[i][j - 1] == '.' && (!used[i][j])) {
        cout << "Not unique";
        return;
      }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++)
      if (field[i][j - 1] == '.')
        printf("%c", ans[i][j]);
      else
        printf("*");
    printf("\n");
  }
}
int main() {
  memset(field, 0, sizeof(field));
  init();
  return 0;
}
