#include <bits/stdc++.h>
using namespace std;
map<long long, int> maxmove;
vector<int> f[11];
char parent[2010][2010];
short childCount[2010][2010];
long long N, M, c;
char grid[2010][2010];
bool unq = true;
bool bfs(int i, int j) {
  queue<pair<int, int> > q;
  vector<pair<int, int> > visited;
  pair<int, int> n;
  n.first = i;
  n.second = j;
  parent[i][j] = 's';
  childCount[i][j] = 0;
  q.push(n);
  long long counts = 1;
  while (!q.empty()) {
    n = q.front();
    q.pop();
    visited.push_back(n);
    i = n.first;
    j = n.second;
    if (i > 0 && parent[i][j] != 'u' && grid[i - 1][j] == '.') {
      if (parent[i - 1][j] != 'n') return false;
      childCount[i][j]++;
      pair<int, int> n1;
      n1.first = i - 1;
      n1.second = j;
      q.push(n1);
      childCount[i - 1][j] = 0;
      parent[i - 1][j] = 'd';
    }
    if (j > 0 && parent[i][j] != 'l' && grid[i][j - 1] == '.') {
      if (parent[i][j - 1] != 'n') return false;
      pair<int, int> n1;
      childCount[i][j]++;
      n1.first = i;
      n1.second = j - 1;
      q.push(n1);
      childCount[i][j - 1] = 0;
      parent[i][j - 1] = 'r';
    }
    if (i < N - 1 && parent[i][j] != 'd' && grid[i + 1][j] == '.') {
      if (parent[i + 1][j] != 'n') return false;
      pair<int, int> n1;
      childCount[i][j]++;
      n1.first = i + 1;
      n1.second = j;
      childCount[i + 1][j] = 0;
      q.push(n1);
      parent[i + 1][j] = 'u';
    }
    if (j < M - 1 && parent[i][j] != 'r' && grid[i][j + 1] == '.') {
      if (parent[i][j + 1] != 'n') return false;
      childCount[i][j]++;
      pair<int, int> n1;
      n1.first = i;
      n1.second = j + 1;
      q.push(n1);
      childCount[i][j + 1] = 0;
      parent[i][j + 1] = 'l';
    }
  }
  if (visited.size() % 2 == 1) return false;
  bool remaining = true;
  while (remaining) {
    remaining = false;
    for (long i = 0; i < visited.size(); i++) {
      int x = visited[i].first, parentx = visited[i].first;
      int y = visited[i].second, parenty = visited[i].second;
      if (childCount[x][y] == 0) {
        if (parent[x][y] == 'u') {
          grid[x][y] = 'v';
          parentx--;
          grid[parentx][parenty] = '^';
        } else if (parent[x][y] == 'd') {
          grid[x][y] = '^';
          parentx++;
          grid[parentx][parenty] = 'v';
        } else if (parent[x][y] == 'l') {
          grid[x][y] = '>';
          parenty--;
          grid[parentx][parenty] = '<';
        } else if (parent[x][y] == 'r') {
          grid[x][y] = '<';
          parenty++;
          grid[parentx][parenty] = '>';
        }
        x = parentx;
        y = parenty;
        if (parent[x][y] == 'u') {
          parentx--;
        } else if (parent[x][y] == 'd') {
          parentx++;
        } else if (parent[x][y] == 'l') {
          parenty--;
        } else if (parent[x][y] == 'r') {
          parenty++;
        }
        childCount[parentx][parenty]--;
        childCount[x][y] = -1;
      } else if (childCount[x][y] > 0)
        remaining = true;
    }
  }
  return true;
}
bool upIsOpen(long x, long y) {
  if (x > 0 && grid[x - 1][y] == '.') return true;
  return false;
}
bool downIsOpen(long x, long y) {
  if (x < N - 1 && grid[x + 1][y] == '.') return true;
  return false;
}
bool leftIsOpen(long x, long y) {
  if (y > 0 && grid[x][y - 1] == '.') return true;
  return false;
}
bool rightIsOpen(long x, long y) {
  if (y < M - 1 && grid[x][y + 1] == '.') return true;
  return false;
}
char getPartnerDirectionAndFill(long x, long y) {
  char direction = 'n';
  int protibeshi = 0, protibeshix, protibeshiy;
  if (upIsOpen(x, y)) {
    direction = 'u';
    protibeshi++;
  }
  if (leftIsOpen(x, y)) {
    direction = 'l';
    protibeshi++;
  }
  if (downIsOpen(x, y)) {
    direction = 'd';
    protibeshi++;
  }
  if (rightIsOpen(x, y)) {
    direction = 'r';
    protibeshi++;
  }
  if (protibeshi == 1) {
    protibeshix = x;
    protibeshiy = y;
    if (direction == 'u') {
      protibeshix--;
      grid[x][y] = 'v';
      grid[x - 1][y] = '^';
    } else if (direction == 'd') {
      protibeshix++;
      grid[x][y] = '^';
      grid[protibeshix][protibeshiy] = 'v';
    } else if (direction == 'l') {
      protibeshiy--;
      grid[x][y] = '>';
      grid[protibeshix][protibeshiy] = '<';
    } else {
      protibeshiy++;
      grid[x][y] = '<';
      grid[protibeshix][protibeshiy] = '>';
    }
    if (upIsOpen(protibeshix, protibeshiy))
      getPartnerDirectionAndFill(protibeshix - 1, protibeshiy);
    if (downIsOpen(protibeshix, protibeshiy))
      getPartnerDirectionAndFill(protibeshix + 1, protibeshiy);
    if (leftIsOpen(protibeshix, protibeshiy))
      getPartnerDirectionAndFill(protibeshix, protibeshiy - 1);
    if (rightIsOpen(protibeshix, protibeshiy))
      getPartnerDirectionAndFill(protibeshix, protibeshiy + 1);
    return direction;
  }
  if (protibeshi == 0) return 'n';
  return 'm';
}
bool fillGrids() {
  bool modified = true, done = false;
  while (modified) {
    modified = false;
    done = true;
    for (long i = 0; i < N; i++) {
      for (long j = 0; j < M; j++) {
        if (grid[i][j] == '.') {
          done = false;
          char d = getPartnerDirectionAndFill(i, j);
          if (d == 'n')
            return false;
          else if (d != 'm') {
            modified = true;
          }
        }
      }
    }
  }
  return done;
}
bool checkGrid() {
  for (long i = 0; i < N; i++) {
    for (long j = 0; j < M; j++) {
      if (grid[i][j] == '.') return false;
    }
  }
  return true;
}
long long gcd(long long a, long long b) {
  long long c;
  if (a > b) {
    c = a;
    a = b;
    b = c;
  }
  c = b % a;
  while (c > 0) {
    b = a;
    a = c;
    c = b % a;
  }
  return a;
}
int main(void) {
  string s;
  vector<int> x;
  vector<int> y;
  bool used[101], happyGirls[101];
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      scanf("%c", &grid[i][j]);
      parent[i][j] = 'n';
      while (grid[i][j] != '.' && grid[i][j] != '*') cin >> grid[i][j];
    }
  }
  if (fillGrids()) {
    for (long i = 0; i < N; i++) {
      for (long j = 0; j < M; j++) {
        printf("%c", grid[i][j]);
      }
      cout << endl;
    }
  } else
    cout << "Not unique" << endl;
  return 0;
}
