#include <bits/stdc++.h>
using namespace std;
int q, h, n, m;
char S[2100][2100];
int du[2100][2100];
int tx[4] = {0, 0, 1, -1}, ty[4] = {1, -1, 0, 0};
int xx[4100000], yy[4100000];
void del(int x, int y) {
  for (int i = 0; i < 4; i++)
    if (S[x + tx[i]][y + ty[i]] == '.') {
      du[x + tx[i]][y + ty[i]]--;
      if (du[x + tx[i]][y + ty[i]] == 1)
        h++, xx[h] = x + tx[i], yy[h] = y + ty[i];
    }
  S[x][y] = '*';
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", S[i] + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (S[i][j] == '.') {
        for (int t = 0; t < 4; t++)
          if (S[i + tx[t]][j + ty[t]] == '.') du[i][j]++;
      }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (S[i][j] == '.' && du[i][j] == 1) {
        h++;
        xx[h] = i;
        yy[h] = j;
      }
  for (q = 1; q <= h; q++)
    if (S[xx[q]][yy[q]] == '.') {
      for (int t = 0; t < 4; t++)
        if (S[xx[q] + tx[t]][yy[q] + ty[t]] == '.') {
          del(xx[q], yy[q]), del(xx[q] + tx[t], yy[q] + ty[t]);
          if (t < 2) {
            S[xx[q]][min(yy[q], yy[q] + ty[t])] = '<';
            S[xx[q]][max(yy[q], yy[q] + ty[t])] = '>';
          } else {
            S[min(xx[q], xx[q] + tx[t])][yy[q]] = '^';
            S[max(xx[q], xx[q] + tx[t])][yy[q]] = 'v';
          }
        }
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (S[i][j] == '.') {
        printf("Not unique\n");
        return 0;
      }
  for (int i = 1; i <= n; i++) printf("%s\n", S[i] + 1);
}
