#include <bits/stdc++.h>
using namespace std;
int n, m;
char grid[2005][2005], ans[2005][2005];
int degree[2005][2005];
int dir[5][2] = {-1, 0, 0, -1, 0, 1, 1, 0, 0, 0};
bool vis[2005][2005];
struct cord {
  int x, y;
};
bool bound(int x, int y) {
  if (x < n && y < m && x > -1 && y > -1) return true;
  return false;
}
int check_degree(int i, int j) {
  if (grid[i][j] == '.') return degree[i][j];
  return -1;
}
void istile(int x, int y, int &a, int &b) {
  for (int i = 0; i < 4; i++) {
    if (bound(x + dir[i][0], y + dir[i][1]) &&
        grid[x + dir[i][0]][y + dir[i][1]] == '.' &&
        !vis[x + dir[i][0]][y + dir[i][1]])
      a = x + dir[i][0], b = y + dir[i][1];
  }
}
int main() {
  cin >> n >> m;
  memset(degree, 0, sizeof degree);
  memset(vis, false, sizeof vis);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      scanf(" %c", &grid[i][j]);
      ans[i][j] = grid[i][j];
    }
  }
  queue<cord> q;
  cord a, b;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (grid[i][j] == '.') cnt++;
      for (int k = 0; k < 4; k++) {
        if (bound(i + dir[k][0], j + dir[k][1]) &&
            grid[i + dir[k][0]][j + dir[k][1]] == '.' && grid[i][j] == '.')
          degree[i][j]++;
      }
      if (check_degree(i, j) == 1) {
        a.x = i, a.y = j;
        q.push(a);
      }
    }
  }
  int c = -1, d = -1;
  while (!q.empty()) {
    a = q.front();
    q.pop();
    if (!vis[a.x][a.y]) {
      vis[a.x][a.y] = true;
      istile(a.x, a.y, c, d);
      if (vis[c][d]) {
        cout << "Not unique";
        return 0;
      }
      vis[c][d] = true;
      cnt -= 2;
      for (int i = 0; i < 4; i++) {
        if (bound(a.x + dir[i][0], a.y + dir[i][1]))
          degree[a.x + dir[i][0]][a.y + dir[i][1]]--;
        if (bound(c + dir[i][0], d + dir[i][1]))
          degree[c + dir[i][0]][d + dir[i][1]]--;
      }
      for (int i = 0; i < 4; i++) {
        if (bound(a.x + dir[i][0], a.y + dir[i][1]) &&
            check_degree(a.x + dir[i][0], a.y + dir[i][1]) == 1 &&
            !vis[a.x + dir[i][0]][a.y + dir[i][1]]) {
          b.x = a.x + dir[i][0], b.y = a.y + dir[i][1];
          q.push(b);
        }
        if (bound(c + dir[i][0], d + dir[i][1]) &&
            check_degree(c + dir[i][0], d + dir[i][1]) == 1 &&
            !vis[c + dir[i][0]][d + dir[i][1]]) {
          b.x = c + dir[i][0], b.y = d + dir[i][1];
          q.push(b);
        }
      }
      if (c == a.x) {
        if (d < a.y)
          ans[a.x][a.y] = '>', ans[c][d] = '<';
        else
          ans[a.x][a.y] = '<', ans[c][d] = '>';
      } else if (d == a.y) {
        if (c < a.x)
          ans[a.x][a.y] = 'v', ans[c][d] = '^';
        else
          ans[a.x][a.y] = '^', ans[c][d] = 'v';
      }
    }
  }
  if (cnt != 0)
    cout << "Not unique";
  else {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) cout << ans[i][j];
      cout << endl;
    }
  }
}
