#include <bits/stdc++.h>
using namespace std;
int n, m;
const int d1[10] = {0, -1, 0, 1}, d2[10] = {1, 0, -1, 0};
int cnt = 0, ans = 0;
char s[2020][2020];
int d[2020][2020];
bool can[2020][2020];
inline int change(const int &i, const int &j) { return (i - 1) * m + j; }
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    getchar();
    for (int j = 1; j <= m; j++) {
      s[i][j] = getchar();
      if (s[i][j] == '.') {
        can[i][j] = 1;
        ans++;
      }
    }
  }
  if (ans % 2 == 1) {
    cout << "Not unique";
    return 0;
  }
  ans /= 2;
  queue<int> Q;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      for (int k = 0; k < 4; k++) {
        int tox = i + d1[k], toy = j + d2[k];
        if (can[tox][toy]) d[i][j]++;
      }
      if (d[i][j] == 1) {
        Q.push(change(i, j));
      }
    }
  }
  while (!Q.empty()) {
    int now = Q.front();
    Q.pop();
    int x = now / m + 1, y = now % m;
    if (y == 0) {
      y = m;
      x--;
    }
    if (!can[x][y]) continue;
    bool flag = false;
    int px, py;
    for (int i = 0; i < 4; i++) {
      int tox = x + d1[i], toy = y + d2[i];
      if (can[tox][toy]) {
        px = tox;
        py = toy;
        can[tox][toy] = can[x][y] = false;
        if (x == tox) {
          if (toy > y) {
            s[tox][toy] = '>';
            s[x][y] = '<';
          } else {
            s[tox][toy] = '<';
            s[x][y] = '>';
          }
        } else {
          if (tox > x) {
            s[tox][toy] = 'v';
            s[x][y] = '^';
          } else {
            s[tox][toy] = '^';
            s[x][y] = 'v';
          }
        }
        cnt++;
        flag = true;
        break;
      }
    }
    if (!flag) {
      printf("Not unique");
      return 0;
    }
    for (int i = 0; i < 4; i++) {
      int tox = x + d1[i], toy = y + d2[i];
      if (tox) d[tox][toy]--;
      if (d[tox][toy] == 1) Q.push(change(tox, toy));
    }
    for (int i = 0; i < 4; i++) {
      int tox = px + d1[i], toy = py + d2[i];
      d[tox][toy]--;
      if (d[tox][toy] == 1) Q.push(change(tox, toy));
    }
  }
  if (cnt != ans) {
    printf("Not unique");
  } else {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) printf("%c", s[i][j]);
      printf("\n");
    }
  }
  return 0;
}
