#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-5;
long long llinf = 1e18 + 10;
int intinf = 1e9 + 7;
const long long mod = 1e9 + 7;
const int N = 2016;
int n, m;
char s[N][N];
int mx[] = {0, -1, 0, +1};
int my[] = {+1, 0, -1, 0};
string ppp = "<v>^";
vector<int> adj[N][N];
int deg[N][N], vis[N][N];
int main() {
  scanf("%d%d", &(n), &(m));
  for (int i = 0; i < int(n); ++i) {
    scanf("%s", s[i]);
  }
  queue<pair<int, int> > q;
  for (int i = 0; i < int(n); ++i) {
    for (int j = 0; j < int(m); ++j) {
      for (int k = 0; k < int(4); ++k)
        if (s[i][j] == '.') {
          int x = i + mx[k], y = j + my[k];
          if (s[x][y] == '.') adj[i][j].push_back(k), deg[i][j]++;
        }
      if (deg[i][j] == 1) q.push({i, j});
    }
  }
  memset(vis, -1, sizeof vis);
  while (q.size()) {
    pair<int, int> u = q.front();
    q.pop();
    int i = u.first, j = u.second;
    if (vis[i][j] != -1) continue;
    for (int k : adj[i][j]) {
      int x = i + mx[k], y = j + my[k];
      if (vis[x][y] != -1) continue;
      vis[i][j] = k, vis[x][y] = (k + 2) % 4;
      for (int h : adj[x][y]) {
        int a = x + mx[h], b = y + my[h];
        deg[a][b]--;
        if (vis[a][b] == -1 && deg[a][b] == 1) q.push({a, b});
      }
      for (int h : adj[i][j]) {
        int a = i + mx[h], b = j + my[h];
        deg[a][b]--;
        if (vis[a][b] == -1 && deg[a][b] == 1) q.push({a, b});
      }
    }
  }
  for (int i = 0; i < int(n); ++i) {
    for (int j = 0; j < int(m); ++j) {
      if (s[i][j] == '.' && vis[i][j] == -1) {
        printf("Not unique\n");
        return 0;
      }
    }
  }
  for (int i = 0; i < int(n); ++i) {
    for (int j = 0; j < int(m); ++j) {
      if (s[i][j] == '*')
        printf("%c", s[i][j]);
      else
        printf("%c", ppp[vis[i][j]]);
    }
    printf("\n");
  }
  return 0;
}
