#include <bits/stdc++.h>
using namespace std;
const int md = 1000000007;
const int maxn = 2020;
const int maxn4 = 4 * maxn;
const long long inf = 2020202020202020202LL;
int n, m, a[maxn][maxn], fn[maxn][maxn], cnt, deg[maxn][maxn], num;
vector<pair<int, int> > al;
int chck(int x, int y) {
  if (x >= 0 && y >= 0 && x < n && y < m)
    if (!a[x][y]) return 1;
  return 0;
}
void swpe(int x, int y) {
  if (chck(x + 1, y)) {
    deg[x + 1][y]--;
    if (deg[x + 1][y] == 1) al.push_back(make_pair(x + 1, y));
  }
  if (chck(x - 1, y)) {
    deg[x - 1][y]--;
    if (deg[x - 1][y] == 1) al.push_back(make_pair(x - 1, y));
  }
  if (chck(x, y + 1)) {
    deg[x][y + 1]--;
    if (deg[x][y + 1] == 1) al.push_back(make_pair(x, y + 1));
  }
  if (chck(x, y - 1)) {
    deg[x][y - 1]--;
    if (deg[x][y - 1] == 1) al.push_back(make_pair(x, y - 1));
  }
}
int main() {
  ios::ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      char c;
      cin >> c;
      if (c == '.') {
        a[i][j] = 0;
        cnt++;
      } else
        a[i][j] = 1;
    }
  int t = 1;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (!a[i][j]) {
        int v = 0;
        v = chck(i, j + 1) + chck(i, j - 1) + chck(i + 1, j) + chck(i - 1, j);
        if (v == 0) t = 0;
        if (v == 1) al.push_back(make_pair(i, j));
        deg[i][j] = v;
      }
    }
  if (!t) {
    cout << "Not unique";
    return 0;
  }
  while (al.size() > 0) {
    pair<int, int> p = al[al.size() - 1];
    int i = p.first, j = p.second;
    al.pop_back();
    if (deg[i][j] != 1) continue;
    if (chck(i, j - 1))
      if (deg[i][j - 1] > 0) {
        fn[i][j] = 3;
        fn[i][j - 1] = 1;
        deg[i][j] = 0;
        deg[i][j - 1] = 0;
        swpe(i, j - 1);
        num += 2;
      }
    if (chck(i, j + 1))
      if (deg[i][j + 1] > 0) {
        fn[i][j] = 1;
        fn[i][j + 1] = 3;
        deg[i][j] = 0;
        deg[i][j + 1] = 0;
        swpe(i, j + 1);
        num += 2;
      }
    if (chck(i + 1, j))
      if (deg[i + 1][j] > 0) {
        fn[i][j] = 2;
        fn[i + 1][j] = 4;
        deg[i][j] = 0;
        deg[i + 1][j] = 0;
        swpe(i + 1, j);
        num += 2;
      }
    if (chck(i - 1, j))
      if (deg[i - 1][j] > 0) {
        fn[i][j] = 4;
        fn[i - 1][j] = 2;
        deg[i][j] = 0;
        deg[i - 1][j] = 0;
        swpe(i - 1, j);
        num += 2;
      }
  }
  if (num != cnt) t = 0;
  if (!t) {
    cout << "Not unique";
    return 0;
  } else {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (fn[i][j] == 0) printf("%c", '*');
        if (fn[i][j] == 1) printf("%c", '<');
        if (fn[i][j] == 2) printf("%c", '^');
        if (fn[i][j] == 3) printf("%c", '>');
        if (fn[i][j] == 4) printf("%c", 'v');
      }
      printf("\n");
    }
  }
  return 0;
}
