#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e3;
const int dirs[4][2] = {{0, -1}, {1, 0}, {0, 1}, {-1, 0}};
const char ch[4][2] = {{'>', '<'}, {'^', 'v'}, {'<', '>'}, {'v', '^'}};
bool mat[MAXN + 7][MAXN + 7];
int cnt[MAXN + 7][MAXN + 7];
char ans[MAXN + 7][MAXN + 7];
bool valid(int i, int j, int n, int m) {
  return (i >= 1 and i <= n and j >= 1 and j <= m);
}
void wr(int i, int j, char ch, int n, int m) {
  ans[i][j] = ch;
  mat[i][j] = true;
  for (int dir = 0; dir < 4; dir++) {
    int i2 = i + dirs[dir][0];
    int j2 = j + dirs[dir][1];
    if (not valid(i2, j2, n, m)) {
      continue;
    }
    cnt[i2][j2]++;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cnt[i][1]++;
    cnt[i][m]++;
  }
  for (int j = 1; j <= m; j++) {
    cnt[1][j]++;
    cnt[n][j]++;
  }
  for (int i = 1; i <= n; i++) {
    string st;
    cin >> st;
    for (int j = 1; j <= m; j++) {
      if (st[j - 1] == '*') {
        mat[i][j] = true;
        ans[i][j] = '*';
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (mat[i][j] == true) {
        for (int dir = 0; dir < 4; dir++) {
          int i2 = i + dirs[dir][0];
          int j2 = j + dirs[dir][1];
          if (i2 >= 1 and i2 <= n and j2 >= 1 and j2 <= m) {
            cnt[i2][j2]++;
          }
        }
      }
    }
  }
  queue<pair<int, int> > q;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (mat[i][j] == false) {
        if (cnt[i][j] == 3) {
          q.push({i, j});
        }
      }
    }
  }
  while (!q.empty()) {
    int i = q.front().first;
    int j = q.front().second;
    q.pop();
    for (int dir = 0; dir < 4; dir++) {
      int i2 = i + dirs[dir][0];
      int j2 = j + dirs[dir][1];
      if (not valid(i2, j2, n, m)) {
        continue;
      }
      if (mat[i2][j2] == false) {
        wr(i, j, ch[dir][0], n, m);
        wr(i2, j2, ch[dir][1], n, m);
        for (int dir2 = 0; dir2 < 4; dir2++) {
          int i3 = i2 + dirs[dir2][0];
          int j3 = j2 + dirs[dir2][1];
          if (not valid(i3, j3, n, m)) {
            continue;
          }
          if (mat[i3][j3] == false and cnt[i3][j3] == 3) {
            q.push({i3, j3});
          }
        }
        break;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (mat[i][j] == false) {
        cout << "Not unique"
             << "\n";
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      printf("%c", ans[i][j]);
    }
    printf("\n");
  }
  return 0;
}
