#include <bits/stdc++.h>
using namespace std;
void boost() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const int N = 1e6;
const long long inf = 1e9 + 7;
const long double PI = acos(-1);
template <typename A, typename B>
bool mini(A& x, const B& y) {
  if (y < x) {
    x = y;
    return 1;
  }
  return 0;
}
long long bin_pow(long long x, long long y) {
  long long res = 1, base = x;
  while (y) {
    if (y & 1) {
      res *= base;
      res %= inf;
    }
    base *= base;
    base %= inf;
    y /= 2;
  }
  return res;
}
int n, m;
char a[2005][2005];
queue<pair<int, int> > q;
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int main() {
  boost();
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> a[i][j];
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '*') {
        continue;
      }
      int cnt = 0;
      for (int k = 0; k < 4; k++) {
        if (i + dx[k] >= 1 && j + dy[k] >= 1 && i + dx[k] <= n &&
            j + dy[k] <= m) {
          cnt += (a[i + dx[k]][j + dy[k]] == '.');
        }
      }
      if (cnt == 1) {
        q.push(make_pair(i, j));
      }
    }
  }
  while (!q.empty()) {
    int vx = (q.front()).first, vy = (q.front()).second;
    q.pop();
    if (a[vx][vy] != '.') {
      continue;
    }
    int posx = -1, posy = -1;
    for (int i = 0; i < 4; i++) {
      if (vx + dx[i] < 1 || vx + dx[i] > n || vy + dy[i] < 1 ||
          vy + dy[i] > m) {
        continue;
      }
      if (a[vx + dx[i]][vy + dy[i]] == '.') {
        if (i == 0) {
          a[vx][vy] = '^';
          a[vx + dx[i]][vy + dy[i]] = 'v';
          posx = vx + dx[i], posy = vy + dy[i];
        }
        if (i == 1) {
          a[vx][vy] = 'v';
          a[vx + dx[i]][vy + dy[i]] = '^';
          posx = vx + dx[i], posy = vy + dy[i];
        }
        if (i == 2) {
          a[vx][vy] = '<';
          a[vx + dx[i]][vy + dy[i]] = '>';
          posx = vx + dx[i], posy = vy + dy[i];
        }
        if (i == 3) {
          a[vx][vy] = '>';
          a[vx + dx[i]][vy + dy[i]] = '<';
          posx = vx + dx[i], posy = vy + dy[i];
        }
      }
    }
    if (posx == -1 && posy == -1) {
      continue;
    }
    for (int i = 0; i < 4; i++) {
      if (posx + dx[i] < 1 || posx + dx[i] > n || posy + dy[i] < 1 ||
          posy + dy[i] > m) {
        continue;
      }
      if (a[posx + dx[i]][posy + dy[i]] == '.') {
        int curx = posx + dx[i], cury = posy + dy[i];
        int cnt = 0;
        for (int j = 0; j < 4; j++) {
          if (curx + dx[j] < 1 || curx + dx[j] > n || cury + dy[j] < 1 ||
              cury + dy[j] > m) {
            continue;
          }
          if (a[curx + dx[j]][cury + dy[j]] == '.') {
            cnt++;
          }
        }
        if (cnt == 1) {
          q.push(make_pair(curx, cury));
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cout << a[i][j];
    }
    cout << endl;
  }
}
