#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2111;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
char a[MAXN][MAXN];
int vis[MAXN][MAXN];
int n, m, cnt;
inline int degree(int x, int y) {
  return (a[x - 1][y] == '.' ? 1 : 0) + (a[x + 1][y] == '.' ? 1 : 0) +
         (a[x][y - 1] == '.' ? 1 : 0) + (a[x][y + 1] == '.' ? 1 : 0);
}
inline int apply(int x, int y) {
  if (a[x - 1][y] == '.') {
    a[x - 1][y] = '^';
    a[x][y] = 'v';
    return 2;
  }
  if (a[x + 1][y] == '.') {
    a[x][y] = '^';
    a[x + 1][y] = 'v';
    return 0;
  }
  if (a[x][y - 1] == '.') {
    a[x][y - 1] = '<';
    a[x][y] = '>';
    return 3;
  }
  if (a[x][y + 1] == '.') {
    a[x][y] = '<';
    a[x][y + 1] = '>';
    return 1;
  }
}
inline void dfs(int x, int y) {
  vis[x][y] = 1;
  int dir = apply(x, y);
  x += dx[dir], y += dy[dir];
  for (int i = 0; i < 4; ++i) {
    int nx = x + dx[i], ny = y + dy[i];
    if (nx > 0 && nx <= n && ny > 0 && ny <= m) {
      if (!vis[nx][ny] && a[nx][ny] == '.' && degree(nx, ny) == 1) {
        dfs(nx, ny);
      }
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%s", a[i] + 1);
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (!vis[i][j] && a[i][j] == '.' && degree(i, j) == 1) {
        dfs(i, j);
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (!vis[i][j] && a[i][j] == '.' && degree(i, j) == 1) {
        dfs(i, j);
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (a[i][j] == '.') {
        puts("Not unique");
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    printf("%s\n", a[i] + 1);
  }
  return 0;
}
