#include <bits/stdc++.h>
using namespace std;
const int N = 4 * 1e6 + 100;
char s[2010][2010];
vector<int> A[N], w;
int n, m;
bool id = 0;
int change(int a, int b) {
  int t;
  t = m * a + b;
  return t;
}
int res = 0, ans = 0;
bool color[N] = {};
void check(int a) {
  int st = 0;
  for (int i = 0; i < A[a].size(); i++)
    if (color[A[a][i]] == 0) st++;
  if (st == 1 && color[a] == 0) {
    w.push_back(a);
  } else
    return;
}
void recu(int a) {
  int b;
  bool f = 0;
  for (int i = 0; i < A[a].size(); i++)
    if (color[A[a][i]] == 0) {
      b = A[a][i];
      f = 1;
      break;
    }
  if (!f) {
    id = 1;
    return;
  }
  res += 2;
  color[a] = 1;
  color[b] = 1;
  int q = a / m;
  int r = b / m;
  int p = a % m;
  int g = b % m;
  if (q == r && g > p) {
    s[r][g] = '>';
    s[q][p] = '<';
  } else if (q == r && p > g) {
    s[q][p] = '>';
    s[r][g] = '<';
  } else if (q < r && p == g) {
    s[r][g] = 'v';
    s[q][p] = '^';
  } else {
    s[q][p] = 'v';
    s[r][g] = '^';
  }
  for (int i = 0; i < A[b].size(); i++) {
    int v = A[b][i];
    check(v);
  }
}
int main() {
  int sum = 0;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%s", s[i]);
    for (int j = 0; j < m; j++)
      if (s[i][j] == '.') sum++;
  }
  if (!sum) {
    for (int i = 0; i < n; i++) printf("%s\n", s[i]);
    return 0;
  }
  if (sum % 2 == 1) {
    puts("Not unique");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '.') {
        int flag = 0;
        int k, t, p;
        k = change(i, j);
        if (j != m - 1 && s[i][j + 1] == '.') {
          t = change(i, j + 1);
          flag++;
          A[k].push_back(t);
          A[t].push_back(k);
        }
        if (i != n - 1 && s[i + 1][j] == '.') {
          p = change(i + 1, j);
          flag++;
          A[k].push_back(p);
          A[p].push_back(k);
        }
        if (A[k].size() == 0) {
          puts("Not unique");
          return 0;
        }
        if (A[k].size() == 1) w.push_back(k);
        ans++;
      } else
        color[change(i, j)] = 1;
    }
  }
  for (int i = 0; i < w.size(); i++) {
    int u = w[i];
    id = 0;
    if (color[u] == 0) {
      recu(u);
      if (id) {
        puts("Not unique");
        return 0;
      }
    }
  }
  if (res != ans) {
    puts("Not unique");
    return 0;
  }
  for (int i = 0; i < n; i++) printf("%s\n", s[i]);
}
