#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e3 + 5;
int n, m;
char grid[MAX][MAX];
vector<pair<int, int> > adj[MAX][MAX];
bool visited[MAX][MAX];
vector<pair<int, int> > dir{{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
int degree[MAX][MAX];
inline bool inside(int x, int y) {
  return x >= 1 && x <= n && y >= 1 && y <= m;
}
void bfs(int a, int b) {
  queue<pair<int, int> > q;
  q.emplace(a, b);
  visited[a][b] = true;
  int total = 0;
  while (!q.empty()) {
    pair<int, int> cur = q.front();
    q.pop();
    int x, y;
    tie(x, y) = cur;
    total++;
    for (auto &each : dir) {
      int nx = x + each.first;
      int ny = y + each.second;
      if (inside(nx, ny) && !visited[nx][ny] && grid[nx][ny] == '.') {
        visited[nx][ny] = true;
        q.emplace(nx, ny);
      }
    }
  }
  if (total & 1) {
    puts("Not unique");
    exit(0);
  }
}
int main() {
  scanf("%d %d%*c", &n, &m);
  for (int i = int(1); i < int(n + 1); i++) {
    for (int j = int(1); j < int(m + 1); j++) {
      scanf("%c", &grid[i][j]);
    }
    scanf("%*c");
  }
  int points = 0;
  queue<pair<int, int> > guys;
  for (int i = int(1); i < int(n + 1); i++) {
    for (int j = int(1); j < int(m + 1); j++) {
      if (!visited[i][j] && grid[i][j] == '.') {
        bfs(i, j);
      }
      if (grid[i][j] == '.') {
        points++;
        for (auto &each : dir) {
          int ni = i + each.first;
          int nj = j + each.second;
          if (inside(ni, nj) && grid[ni][nj] == '.') {
            degree[i][j]++;
          }
        }
        if (degree[i][j] == 1) {
          guys.emplace(i, j);
        }
      }
    }
  }
  if (guys.empty() && points) {
    puts("Not unique");
    return 0;
  }
  while (!guys.empty()) {
    auto cur = guys.front();
    guys.pop();
    int x = cur.first;
    int y = cur.second;
    if (grid[x][y] != '.') {
      continue;
    }
    bool found = false;
    for (auto &each : dir) {
      int nx = x + each.first;
      int ny = y + each.second;
      if (inside(nx, ny) && grid[nx][ny] == '.') {
        if (each.first == 1) {
          grid[x][y] = '^';
          grid[nx][ny] = 'v';
        } else if (each.first == -1) {
          grid[x][y] = 'v';
          grid[nx][ny] = '^';
        } else if (each.second == 1) {
          grid[x][y] = '<';
          grid[nx][ny] = '>';
        } else if (each.second == -1) {
          grid[x][y] = '>';
          grid[nx][ny] = '<';
        }
        degree[x][y]--;
        degree[nx][ny]--;
        for (auto &each2 : dir) {
          int nnx = nx + each2.first;
          int nny = ny + each2.second;
          if (inside(nnx, nny) && grid[nnx][nny] == '.') {
            degree[nnx][nny]--;
            if (degree[nnx][nny] == 1) {
              guys.emplace(nnx, nny);
            }
          }
        }
        if (degree[nx][ny] == 1) {
          guys.emplace(nx, ny);
        }
        found = true;
        break;
      }
    }
    if (!found) {
      puts("Not unique");
      return 0;
    }
  }
  for (int i = int(1); i < int(n + 1); i++) {
    for (int j = int(1); j < int(m + 1); j++) {
      if (grid[i][j] == '.') {
        puts("Not unique");
        return 0;
      }
    }
  }
  for (int i = int(1); i < int(n + 1); i++) {
    for (int j = int(1); j < int(m + 1); j++) {
      printf("%c", grid[i][j]);
    }
    printf("\n");
  }
  return 0;
}
