#include <bits/stdc++.h>
using namespace std;
int N, M;
char in[2010][2010];
int deg[2010][2010];
pair<int, int> Q[4000010];
int QL, QR, FREE;
int sft[4][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
int get(int x, int y) {
  if (x < 0 || x >= N || y < 0 || y >= M) return '*';
  return in[x][y];
}
void say_no() {
  puts("Not unique");
  exit(0);
}
void put(pair<int, int> a, pair<int, int> b) {
  if (a > b) swap(a, b);
  if (a.first == b.first)
    in[a.first][a.second] = '<', in[b.first][b.second] = '>';
  else
    in[a.first][a.second] = '^', in[b.first][b.second] = 'v';
}
int main() {
  scanf("%d%d", &N, &M);
  for (int i = 0; i < N; ++i) scanf("%s", &in[i]);
  for (int i = 0; i < N; ++i)
    for (int j = 0; j < M; ++j) {
      if (in[i][j] == '*')
        deg[i][j] = -1;
      else
        for (int p = 0; p < 4; ++p)
          if (get(i + sft[p][0], j + sft[p][1]) == '.') ++deg[i][j];
      if (deg[i][j] == 1) Q[QR++] = make_pair(i, j);
      if (deg[i][j] >= 0) ++FREE;
    }
  while (QL < QR) {
    pair<int, int> a = Q[QL++];
    if (deg[a.first][a.second] != 1) continue;
    pair<int, int> b(-1, -1);
    for (int p = 0; p < 4; ++p)
      if (get(a.first + sft[p][0], a.second + sft[p][1]) == '.')
        b = make_pair(a.first + sft[p][0], a.second + sft[p][1]);
    if (b.first < 0) say_no();
    deg[a.first][a.second] = -1;
    deg[b.first][b.second] = -1;
    put(a, b);
    FREE -= 2;
    for (int p = 0; p < 4; ++p)
      if (get(a.first + sft[p][0], a.second + sft[p][1]) == '.') {
        int x = a.first + sft[p][0];
        int y = a.second + sft[p][1];
        --deg[x][y];
        if (deg[x][y] == 1) Q[QR++] = make_pair(x, y);
      }
    for (int p = 0; p < 4; ++p)
      if (get(b.first + sft[p][0], b.second + sft[p][1]) == '.') {
        int x = b.first + sft[p][0];
        int y = b.second + sft[p][1];
        --deg[x][y];
        if (deg[x][y] == 1) Q[QR++] = make_pair(x, y);
      }
  }
  if (FREE != 0) say_no();
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < M; ++j) printf("%c", in[i][j]);
    puts("");
  }
  return 0;
}
