#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2100;
int N, M, num[MAXN][MAXN], sumdot;
int yon[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
char ar[MAXN][MAXN];
queue<pair<int, int> > q;
int main() {
  scanf(" %d %d", &N, &M);
  for (int i = 1; i <= N; i++) scanf(" %s", ar[i] + 1);
  for (int i = 1; i <= N; i++)
    for (int j = 1; j <= M; j++)
      if (ar[i][j] == '.') {
        sumdot++;
        int cnt = 0;
        for (int k = 0; k < 4; k++) {
          pair<int, int> tmp = pair<int, int>(i + yon[k][0], j + yon[k][1]);
          cnt += (ar[tmp.first][tmp.second] == '.' ? 1 : 0);
        }
        num[i][j] = cnt;
        if (num[i][j] == 1) q.push(pair<int, int>(i, j));
      }
  while (!q.empty()) {
    pair<int, int> tmp = q.front();
    q.pop();
    if (ar[tmp.first][tmp.second] != '.') continue;
    pair<int, int> tmp1;
    int x;
    for (int i = 0; i < 4; i++)
      if (ar[tmp.first + yon[i][0]][tmp.second + yon[i][1]] == '.') {
        tmp1 = pair<int, int>(tmp.first + yon[i][0], tmp.second + yon[i][1]);
        x = i;
      }
    if (x == 0)
      ar[tmp.first][tmp.second] = '<', ar[tmp1.first][tmp1.second] = '>';
    if (x == 1)
      ar[tmp.first][tmp.second] = '>', ar[tmp1.first][tmp1.second] = '<';
    if (x == 2)
      ar[tmp.first][tmp.second] = '^', ar[tmp1.first][tmp1.second] = 'v';
    if (x == 3)
      ar[tmp.first][tmp.second] = 'v', ar[tmp1.first][tmp1.second] = '^';
    sumdot -= 2;
    for (int i = 0; i < 4; i++) {
      num[tmp1.first + yon[i][0]][tmp1.second + yon[i][1]]--;
      if (ar[tmp1.first + yon[i][0]][tmp1.second + yon[i][1]] == '.' &&
          num[tmp1.first + yon[i][0]][tmp1.second + yon[i][1]] == 1)
        q.push(pair<int, int>(tmp1.first + yon[i][0], tmp1.second + yon[i][1]));
    }
  }
  if (sumdot)
    printf("Not unique\n");
  else
    for (int i = 1; i <= N; i++, puts(""))
      for (int j = 1; j <= M; j++) printf("%c", ar[i][j]);
  return 0;
}
