#include <bits/stdc++.h>
const int N = 2010;
char grid[N][N];
int deg[N][N];
int dir[][2] = {0, 1, 0, -1, 1, 0, -1, 0};
int n, m;
bool check(int x, int y) {
  if (x >= 0 && y >= 0 && x < n && y < m && grid[x][y] == '.') return true;
  return false;
}
int main() {
  while (~scanf("%d %d", &n, &m)) {
    for (int i = 0; i < n; i++) memset(deg[i], 0, sizeof(int) * m);
    for (int i = 0; i < n; i++) scanf("%s", grid[i]);
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++)
        if (grid[i][j] == '.')
          for (int k = 0; k < 4; k++)
            if (check(i + dir[k][0], j + dir[k][1])) deg[i][j]++;
    std::queue<int> qx, qy;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++)
        if (deg[i][j] == 1) qx.push(i), qy.push(j);
    while (!qx.empty()) {
      int x = qx.front(), y = qy.front();
      qx.pop(), qy.pop();
      for (int i = 0; i < 4; i++) {
        int nx = x + dir[i][0], ny = y + dir[i][1];
        if (check(nx, ny)) {
          if (i == 0) grid[x][y] = '<', grid[nx][ny] = '>';
          if (i == 1) grid[x][y] = '>', grid[nx][ny] = '<';
          if (i == 2) grid[x][y] = '^', grid[nx][ny] = 'v';
          if (i == 3) grid[x][y] = 'v', grid[nx][ny] = '^';
          deg[nx][ny] = 0;
          for (int j = 0; j < 4; j++) {
            int nnx = nx + dir[j][0], nny = ny + dir[j][1];
            if (check(nnx, nny) && --deg[nnx][nny] == 1)
              qx.push(nnx), qy.push(nny);
          }
        }
      }
    }
    bool flag = true;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++)
        if (grid[i][j] == '.') {
          flag = false;
          puts("Not unique");
          break;
        }
      if (!flag) break;
    }
    if (flag)
      for (int i = 0; i < n; i++) grid[i][m] = '\0', printf("%s\n", grid[i]);
  }
  return 0;
}
