#include <bits/stdc++.h>
using namespace std;
int n, m;
char in[2005][2005];
bool vis[2005][2005];
int get(int i, int j) {
  if (i < 0 || j < 0 || i >= n || j >= m) return 0;
  return in[i][j] == '.';
}
int main() {
  scanf("%d %d", &n, &m);
  char buf[2005];
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    scanf("%s", buf);
    for (int j = 0; j < m; j++) {
      in[i][j] = buf[j];
      if (buf[j] == '.') cnt++;
    }
  }
  queue<pair<int, int> > q;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if ((get(i - 1, j) + get(i + 1, j) + get(i, j - 1) + get(i, j + 1) == 1))
        q.push(make_pair(i, j));
  while (!q.empty()) {
    pair<int, int> p = q.front();
    int i = p.first, j = p.second;
    q.pop();
    vis[i][j] = true;
    if (in[i][j] != '.') {
      for (int dx = -1; dx < 2; dx++)
        for (int dy = -1; dy < 2; dy++)
          if (abs(dx) + abs(dy) == 1)
            if (!vis[i + dx][j + dy] &&
                (get(i + dx - 1, j + dy) + get(i + dx + 1, j + dy) +
                     get(i + dx, j + dy - 1) + get(i + dx, j + dy + 1) ==
                 1))
              q.push(make_pair(i + dx, j + dy));
      continue;
    }
    if (get(i + -1, j + 0)) {
      in[i][j] = 'v';
      in[i + -1][j + 0] = '^';
      cnt -= 2;
      q.push(make_pair(i + -1, j + 0));
    };
    if (get(i + 1, j + 0)) {
      in[i][j] = '^';
      in[i + 1][j + 0] = 'v';
      cnt -= 2;
      q.push(make_pair(i + 1, j + 0));
    };
    if (get(i + 0, j + -1)) {
      in[i][j] = '>';
      in[i + 0][j + -1] = '<';
      cnt -= 2;
      q.push(make_pair(i + 0, j + -1));
    };
    if (get(i + 0, j + 1)) {
      in[i][j] = '<';
      in[i + 0][j + 1] = '>';
      cnt -= 2;
      q.push(make_pair(i + 0, j + 1));
    };
  }
  if (cnt) {
    printf("Not unique\n");
    return 0;
  }
  for (int i = 0; i < n; i++, printf("\n"))
    for (int j = 0; j < m; j++) printf("%c", in[i][j]);
  return 0;
}
