#include <bits/stdc++.h>
using namespace std;
const float eps = 1e-8;
const long long lloo = 1e18;
const int oo = 1e9;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
pair<int, int> hd[2000 * 2000 + 10];
int top;
char s[2002][2002];
int bac[2002][2002], dau[2002][2002];
int n, m;
char dirchar(int dir) {
  if (dir == 0) return 'v';
  if (dir == 1) return '>';
  if (dir == 2) return '^';
  if (dir == 3) return '<';
}
char dirchar2(int dir) {
  if (dir == 0) return '^';
  if (dir == 1) return '<';
  if (dir == 2) return 'v';
  if (dir == 3) return '>';
}
int trong(int x, int y) { return (x >= 0 && y >= 0 && x < n && y < m); }
int main() {
  cin >> n >> m;
  for (int i = 0, _b = n - 1; i <= _b; i++) cin >> s[i];
  for (int i = 0, _b = n - 1; i <= _b; i++)
    for (int j = 0, _b = m - 1; j <= _b; j++)
      if (s[i][j] == '.') {
        int dem = 0;
        for (int z = 0, _b = 3; z <= _b; z++) {
          int x = i + dx[z], y = j + dy[z];
          if (trong(x, y) && s[x][y] == '.') dem++;
        }
        bac[i][j] = dem;
        if (dem == 1) {
          hd[top++] = make_pair(i, j);
        }
      }
  int i = 1;
  while (i <= top) {
    int x = hd[i].first, y = hd[i].second;
    if (dau[x][y]) {
      i++;
      continue;
    }
    for (int z = 0, _b = 3; z <= _b; z++) {
      int x2 = x + dx[z], y2 = y + dy[z];
      if (trong(x2, y2) && s[x2][y2] == '.') {
        s[x][y] = dirchar2(z);
        s[x2][y2] = dirchar(z);
        dau[x2][y2] = 1;
        for (int z = 0, _b = 3; z <= _b; z++) {
          int x3 = x2 + dx[z], y3 = y2 + dy[z];
          if (trong(x3, y3) && s[x3][y3] == '.' && dau[x3][y3] == 0) {
            bac[x3][y3]--;
            if (bac[x3][y3] == 1) hd[top++] = make_pair(x3, y3);
          }
        }
      }
    }
    i++;
  }
  for (int i = 0, _b = n - 1; i <= _b; i++)
    for (int j = 0, _b = m - 1; j <= _b; j++)
      if (s[i][j] == '.') {
        cout << "Not unique";
        exit(0);
      }
  for (int i = 0, _b = n - 1; i <= _b; i++) cout << s[i] << endl;
}
