#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 10;
const int M = 128;
const int inf = 0x7fffffff;
const long long INF = 9E18;
const int mod = 1e9 + 7;
const int eps = 1e-7;
char s[maxn][maxn];
int in[maxn][maxn];
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      for (int k = 0; k < 4; k++) {
        int xx = dx[k] + i;
        int yy = dy[k] + j;
        if (s[xx][yy] == '.') in[i][j]++;
      }
    }
  }
  queue<pair<int, int> > q;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (in[i][j] == 1 && s[i][j] == '.') q.push(make_pair(i, j));
    }
  while (!q.empty()) {
    pair<int, int> now = q.front();
    q.pop();
    if (s[now.first][now.second] != '.') continue;
    int nx, ny;
    for (int i = 0; i < 4; i++) {
      int xx = dx[i] + now.first;
      int yy = dy[i] + now.second;
      if (s[xx][yy] != '.') continue;
      if (i == 0) {
        s[now.first][now.second] = '^';
        s[xx][yy] = 'v';
      } else if (i == 1) {
        s[now.first][now.second] = 'v';
        s[xx][yy] = '^';
      } else if (i == 2) {
        s[now.first][now.second] = '<';
        s[xx][yy] = '>';
      } else {
        s[now.first][now.second] = '>';
        s[xx][yy] = '<';
      }
      nx = xx, ny = yy;
    }
    for (int i = 0; i < 4; i++) {
      int xx = dx[i] + nx;
      int yy = dy[i] + ny;
      in[xx][yy]--;
      if (in[xx][yy] == 1 && s[xx][yy] == '.') q.push(make_pair(xx, yy));
    }
    for (int i = 0; i < 4; i++) {
      int xx = dx[i] + now.first;
      int yy = dy[i] + now.second;
      in[xx][yy]--;
      if (in[xx][yy] == 1 && s[xx][yy] == '.') q.push(make_pair(xx, yy));
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '.') {
        puts("Not unique");
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cout << s[i][j];
    }
    cout << endl;
  }
  return 0;
}
