#include <bits/stdc++.h>
using namespace std;
char grid[2010][2010];
int deg[2010][2010];
bool vis[2010][2010];
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
char op1[] = {'v', '<', '^', '>'};
char op2[] = {'^', '>', 'v', '<'};
int main() {
  memset(vis, 0, sizeof vis);
  int N, M;
  cin >> N >> M;
  for (int i = 0; i < N; i++) cin >> grid[i];
  queue<pair<int, int> > Q;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      for (int k = 0; k < 4; k++) {
        int x = i + dx[k];
        int y = j + dy[k];
        if (x < 0 || x == N || y < 0 || y == M || grid[x][y] == '*') continue;
        deg[i][j]++;
      }
      if (grid[i][j] == '.' && deg[i][j] == 1) Q.push(make_pair(i, j));
    }
  }
  while (!Q.empty()) {
    pair<int, int> cur = Q.front();
    int x = cur.first;
    int y = cur.second;
    Q.pop();
    if (vis[x][y]) continue;
    for (int i = 0; i < 4; i++) {
      int xx = x + dx[i];
      int yy = y + dy[i];
      if (xx < 0 || xx == N || yy < 0 || yy == M || grid[xx][yy] == '*' ||
          vis[xx][yy])
        continue;
      vis[x][y] = 1;
      vis[xx][yy] = 1;
      grid[x][y] = op1[i];
      grid[xx][yy] = op2[i];
      deg[xx][yy]--;
      for (int j = 0; j < 4; j++) {
        int newx = xx + dx[j];
        int newy = yy + dy[j];
        if (newx < 0 || newx == N || newy < 0 || newy == M ||
            grid[newx][newy] == '*' || vis[newx][newy])
          continue;
        deg[newx][newy]--;
        if (deg[newx][newy] == 1) Q.push(make_pair(newx, newy));
      }
    }
  }
  bool isFilled = 1;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      if (grid[i][j] == '.') isFilled = 0;
    }
  }
  if (!isFilled)
    cout << "Not unique" << endl;
  else {
    for (int i = 0; i < N; i++) cout << grid[i] << endl;
  }
}
