#include <bits/stdc++.h>
using namespace std;
const int fg[2][4] = {0, 0, -1, 1, -1, 1, 0, 0};
char GG[5];
short C[2005][2005], D[2005][2005];
char cc[2005];
int n, m;
inline bool check(int x, int y) {
  return x > 0 && y > 0 && x <= n && y <= m && C[x][y] >= 0;
}
bool dfs(int x, int y, short c) {
  C[x][y] = c + 1;
  int F = 1;
  for (int i = 0; i < 4; ++i) {
    int X = x + fg[0][i], Y = y + fg[1][i];
    if (check(X, Y)) {
      if (C[X][Y] == 0) {
        if (!dfs(X, Y, c ^ 1)) return 0;
      } else if (C[X][Y] != (c ^ 1) + 1)
        return 0;
    }
  }
  return 1;
}
int G(int x, int y) {
  int R = 0;
  for (int i = 0; i < 4; ++i) {
    if (check(x + fg[0][i], y + fg[1][i])) ++R;
  }
  return R;
}
queue<pair<int, int> > Q;
int main() {
  GG[0] = '>';
  GG[1] = '<';
  GG[2] = 'v';
  GG[3] = '^';
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%s", cc + 1);
    for (int j = 1; j <= m; ++j) {
      C[i][j] = cc[j] == '*' ? -1 : 0;
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (C[i][j] == 0) {
        if (!dfs(i, j, 0)) {
          puts("Not unique");
          return 0;
        };
      }
    }
  }
  int Ta = 0, Tb = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (C[i][j] == 1) ++Ta;
      if (C[i][j] == 2) ++Tb;
    }
  }
  if (Ta != Tb) return puts("Not unique"), 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (check(i, j) && G(i, j) == 1) {
        Q.push(make_pair(i, j));
      }
    }
  }
  while (!Q.empty()) {
    int x = Q.front().first, y = Q.front().second;
    Q.pop();
    for (int i = 0; i < 4; ++i) {
      int X = x + fg[0][i], Y = y + fg[1][i];
      if (check(X, Y) && C[X][Y]) {
        D[X][Y] = i ^ 1, D[x][y] = i;
        C[X][Y] = C[x][y] = -2;
        --Ta;
        for (int j = 0; j < 4; ++j) {
          int xx = X + fg[0][j], yy = Y + fg[1][j];
          if (!check(xx, yy)) continue;
          if (G(xx, yy) == 1) Q.push(make_pair(xx, yy));
        }
      }
    }
  }
  if (Ta > 0) return puts("Not unique"), 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (C[i][j] == -1)
        putchar('*');
      else
        putchar(GG[D[i][j]]);
    }
    putchar('\n');
  }
  return 0;
}
