#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
char s[N][N];
int Du[N][N];
int n, m;
int DX[4] = {0, 0, -1, 1};
int DY[4] = {1, -1, 0, 0};
char dic[10][10] = {"<>", "><", "v^", "^v"};
bool in(int x, int y) {
  if (x >= 0 && x < n && y >= 0 && y < m) return 1;
  return 0;
}
struct T {
  int x, y;
};
queue<T> que;
int visit[N][N];
int main(void) {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%s", s[i]);
  }
  bool FL = true;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (s[i][j] != '.') continue;
      for (int k = 0; k < 4; ++k) {
        int sx = i + DX[k], sy = j + DY[k];
        if (in(sx, sy) && s[sx][sy] == '.') {
          Du[i][j]++;
        }
      }
      if (Du[i][j] == 0) {
        FL = false;
        break;
      }
      if (Du[i][j] == 1) {
        T node;
        node.x = i;
        node.y = j;
        que.push(node);
      }
    }
  }
  while (!que.empty()) {
    T node = que.front();
    que.pop();
    if (visit[node.x][node.y]) continue;
    for (int i = 0; i < 4; ++i) {
      int sx = DX[i] + node.x;
      int sy = DY[i] + node.y;
      if (in(sx, sy) == 0) continue;
      if (s[sx][sy] == '.') {
        s[sx][sy] = dic[i][1];
        s[node.x][node.y] = dic[i][0];
        visit[sx][sy] = 1;
        for (int j = 0; j < 4; ++j) {
          int tx = sx + DX[j];
          int ty = sy + DY[j];
          if (in(tx, ty) == 0) continue;
          Du[tx][ty]--;
          if (Du[tx][ty] == 1) {
            node.x = tx, node.y = ty;
            que.push(node);
          }
        }
        break;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (s[i][j] == '.') {
        FL = false;
        break;
      }
    }
  }
  if (!FL) {
    puts("Not unique");
  } else {
    for (int i = 0; i < n; ++i) {
      printf("%s\n", s[i]);
    }
  }
  return 0;
}
