#include <bits/stdc++.h>
using namespace std;
char vis[2009][2009];
queue<pair<int, int> > q;
int n, m;
int val[2009][2009];
bool valid(int x, int y) {
  return x >= 0 && y >= 0 && x < n && y < m && vis[x][y] == '.';
}
int ic[8] = {1, -1, 0, 0};
int jc[8] = {0, 0, 1, -1};
char suit[6] = {'^', 'v', '<', '>'};
char sother[6] = {'v', '^', '>', '<'};
int check(int x, int y) {
  int s = 0;
  for (int i = 0; i < 4; ++i)
    if (valid(x + ic[i], y + jc[i])) ++s;
  return s;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) scanf("%s", vis[i]);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (vis[i][j] == '.') {
        val[i][j] = check(i, j);
        if (val[i][j] == 1) q.push(make_pair(i, j));
      }
  while (!q.empty()) {
    int x = q.front().first;
    int y = q.front().second;
    q.pop();
    if (vis[x][y] != '.') continue;
    if (check(x, y) == 0) {
      printf("Not unique\n");
      return 0;
    }
    for (int i = 0; i < 4; ++i)
      if (valid(x + ic[i], y + jc[i])) {
        vis[x][y] = suit[i], vis[x + ic[i]][y + jc[i]] = sother[i];
        for (int j = 0; j < 4; ++j) {
          if (valid(x + ic[j], y + jc[j])) {
            --val[x + ic[j]][y + jc[j]];
            if (val[x + ic[j]][y + jc[j]] == 1)
              q.push(make_pair(x + ic[j], y + jc[j]));
          }
          if (valid(x + ic[i] + ic[j], y + jc[i] + jc[j])) {
            --val[x + ic[i] + ic[j]][y + jc[i] + jc[j]];
            if (val[x + ic[i] + ic[j]][y + jc[i] + jc[j]] == 1)
              q.push(make_pair(x + ic[i] + ic[j], y + jc[i] + jc[j]));
          }
        }
      }
  }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (vis[i][j] == '.') {
        printf("Not unique\n");
        return 0;
      }
  for (int i = 0; i < n; ++i) printf("%s\n", vis[i]);
}
