#include <bits/stdc++.h>
using namespace std;
struct Point {
  int x, y;
};
char G[2010][2010];
int degree[2010][2010] = {0};
int m, n;
bool isin(int x, int y) { return x >= 0 && x < m && y >= 0 && y < n; }
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int getDegree(int x, int y) {
  if (G[x][y] == '*') return 0;
  int sum = 0;
  for (int i = 0; i < 4; i++) {
    int newx = x + dx[i];
    int newy = y + dy[i];
    sum += (isin(newx, newy) && G[newx][newy] != '*');
  }
  return sum;
}
int main() {
  cin >> m >> n;
  for (int i = 0; i < m; i++) scanf("%s", G[i]);
  queue<Point> Q;
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      degree[i][j] = getDegree(i, j);
      if (degree[i][j] == 1) Q.push(Point{i, j});
    }
  char oldtype[] = {'^', '<', 'v', '>'};
  char newtype[] = {'v', '>', '^', '<'};
  while (!Q.empty()) {
    Point x = Q.front();
    Q.pop();
    degree[x.x][x.y] = 0;
    for (int i = 0; i < 4; i++) {
      int newx = x.x + dx[i];
      int newy = x.y + dy[i];
      if (isin(newx, newy) && degree[newx][newy]) {
        degree[newx][newy] = 0;
        G[x.x][x.y] = oldtype[i];
        G[newx][newy] = newtype[i];
        for (int j = 0; j < 4; j++) {
          int curx = newx + dx[j];
          int cury = newy + dy[j];
          if (isin(curx, cury) && degree[curx][cury]) {
            degree[curx][cury]--;
            if (degree[curx][cury] == 1) Q.push(Point{curx, cury});
          }
        }
        break;
      }
    }
  }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      if (G[i][j] == '.') {
        puts("Not unique");
        return 0;
      }
    }
  for (int i = 0; i < m; i++) puts(G[i]);
  return 0;
}
