#include <bits/stdc++.h>
using namespace std;
char grid[2007][2007];
short int d[2007][2007];
char answer[2007][2007];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) answer[i][j] = '*';
  char c;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) {
      cin >> c;
      if (c == '.')
        grid[i][j] = true;
      else
        grid[i][j] = false;
    }
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) {
      d[i][j] = 0;
      if (!grid[i][j]) continue;
      if (grid[i - 1][j]) ++d[i][j];
      if (grid[i + 1][j]) ++d[i][j];
      if (grid[i][j - 1]) ++d[i][j];
      if (grid[i][j + 1]) ++d[i][j];
    }
  queue<pair<int, int> > Q;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) {
      if (d[i][j] == 1) Q.push(make_pair(i, j));
    }
  while (!Q.empty()) {
    pair<int, int> P = Q.front();
    Q.pop();
    int x = P.first;
    int y = P.second;
    if (d[x][y] != 1) continue;
    pair<int, int> nei;
    if (grid[x - 1][y]) nei = make_pair(x - 1, y);
    if (grid[x + 1][y]) nei = make_pair(x + 1, y);
    if (grid[x][y - 1]) nei = make_pair(x, y - 1);
    if (grid[x][y + 1]) nei = make_pair(x, y + 1);
    int xx = nei.first;
    int yy = nei.second;
    for (int i = -1; i <= 1; ++i)
      for (int j = -1; j <= 1; ++j) {
        if (i * i + j * j != 1) continue;
        d[x + i][y + j]--;
        d[xx + i][yy + j]--;
      }
    d[x][y] = 0;
    d[xx][yy] = 0;
    grid[x][y] = false;
    grid[xx][yy] = false;
    if (xx == x + 1) answer[x][y] = '^', answer[xx][yy] = 'v';
    if (xx == x - 1) answer[x][y] = 'v', answer[xx][yy] = '^';
    if (yy == y + 1) answer[x][y] = '<', answer[xx][yy] = '>';
    if (yy == y - 1) answer[x][y] = '>', answer[xx][yy] = '<';
    for (int i = -1; i <= 1; ++i)
      for (int j = -1; j <= 1; ++j) {
        if (i * i + j * j != 1) continue;
        if (d[x + i][y + j] == 1) Q.push(make_pair(x + i, y + j));
        if (d[xx + i][yy + j] == 1) Q.push(make_pair(xx + i, yy + j));
      }
  }
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) {
      if (grid[i][j] || d[i][j] > 0) {
        cout << "Not unique";
        return 0;
      }
    }
  for (int i = 1; i <= n; ++i, printf("\n"))
    for (int j = 1; j <= m; ++j) {
      printf("%c", answer[i][j]);
    }
  return 0;
}
