#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
int dx[] = {0, 0, 1, -1};
int dy[] = {-1, 1, 0, 0};
struct nd {
  int x, y;
  nd() {}
  nd(int _x, int _y) {
    x = _x;
    y = _y;
  }
};
char str[3000][3000], ou[3000][3000];
int vis[3000][3000], deg[3000][3000], n, m;
queue<nd> qe;
void bsano(int id, int x, int y, int p, int q) {
  if (id == 0) {
    ou[p][q] = '<';
    ou[x][y] = '>';
  }
  if (id == 1) {
    ou[p][q] = '>';
    ou[x][y] = '<';
  }
  if (id == 2) {
    ou[p][q] = 'v';
    ou[x][y] = '^';
  }
  if (id == 3) {
    ou[p][q] = '^';
    ou[x][y] = 'v';
  }
}
int check(int p, int q) {
  if (p < 0 || p >= n || q < 0 || q >= m) return 0;
  if (str[p][q] == '*' || vis[p][q]) return 0;
  return 1;
}
void bfs() {
  while (!qe.empty()) {
    nd gr = qe.front();
    qe.pop();
    if (vis[gr.x][gr.y]) continue;
    for (int i = 0; i < 4; i++) {
      int p = gr.x + dx[i];
      int q = gr.y + dy[i];
      if (check(p, q)) {
        deg[p][q]--;
        vis[p][q] = 1;
        for (int k = 0; k < 4; k++) {
          int r = p + dx[k];
          int s = q + dy[k];
          if (r == gr.x && s == gr.y) continue;
          if (!check(r, s)) continue;
          deg[r][s]--;
          if (deg[r][s] == 1) {
            qe.push(nd(r, s));
          }
        }
        bsano(i, gr.x, gr.y, p, q);
        vis[gr.x][gr.y] = 1;
        break;
      }
    }
  }
}
int main() {
  int i, j, k, l;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    scanf("%s", str[i]);
  }
  int ck = 0, ct = 0;
  ;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (str[i][j] == '*') continue;
      ct++;
      for (int k = 0; k < 4; k++) {
        int p = i + dx[k];
        int q = j + dy[k];
        if (check(p, q)) deg[i][j]++;
      }
      ck |= (deg[i][j] == 1);
      if (deg[i][j] == 1) qe.push(nd(i, j));
    }
  }
  bfs();
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (str[i][j] == '.' && vis[i][j] == 0) {
        ck = 0;
      }
    }
  }
  if (ck == 0 && ct) {
    printf("Not unique\n");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (str[i][j] == '*')
        cout << str[i][j];
      else
        cout << ou[i][j];
    }
    cout << endl;
  }
}
