#include <bits/stdc++.h>
#pragma GCC optimize(4)
using namespace std;
inline int read() {
  char ch;
  int res = 1;
  while ((ch = getchar()) < '0' || ch > '9')
    if (ch == '-') res = -1;
  res *= ch - 48;
  while ((ch = getchar()) >= '0' && ch <= '9') res = res * 10 + ch - 48;
  return res;
}
int n, m, cnt;
char s[2005], color[2005][2005], ans[2005][2005];
bool flag;
int d[2005][2005];
int sx[4] = {1, -1, 0, 0};
int sy[4] = {0, 0, 1, -1};
struct hp {
  int x, y;
};
queue<hp> q;
int main() {
  n = read(), m = read();
  for (int i = 1; i <= n; i++) {
    gets(s);
    for (int j = 1; j <= m; j++) {
      color[i][j] = s[j - 1];
      if (color[i][j] == '*') cnt++;
    }
  }
  if (cnt == n * m) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) printf("*");
      printf("\n");
    }
    return 0;
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (color[i][j] == '.') {
        int du = 0;
        for (int k = 0; k <= 3; k++) {
          int nowx = i + sx[k], nowy = j + sy[k];
          if (nowx <= 0 || nowx > n || nowy <= 0 || nowy > m ||
              color[nowx][nowy] != '.')
            continue;
          du++;
        }
        d[i][j] = du;
        if (d[i][j] == 1) q.push((hp){i, j});
      } else
        ans[i][j] = '*';
  while (1) {
    int i, j;
    if (!q.empty()) {
      hp pt = q.front();
      q.pop();
      i = pt.x;
      j = pt.y;
      if (color[i][j] == '*' || d[i][j] != 1) continue;
      for (int k = 0; k < 4; ++k) {
        int nowx = i + sx[k], nowy = j + sy[k];
        if (nowx <= 0 || nowx > n || nowy <= 0 || nowy > m) continue;
        if (color[nowx][nowy] == '.') {
          for (int l = 0; l <= 3; l++) {
            int nxtx = nowx + sx[l], nxty = nowy + sy[l];
            if (nxtx <= 0 || nxtx > n || nxty <= 0 || nxty > m ||
                color[nxtx][nxty] == '*')
              continue;
            d[nxtx][nxty]--;
            if (d[nxtx][nxty] == 1) q.push((hp){nxtx, nxty});
          }
          color[nowx][nowy] = color[i][j] = '*';
          d[nowx][nowy] = d[i][j] = 0;
          cnt += 2;
          flag = false;
          switch (k) {
            case 0: {
              ans[i][j] = '^';
              ans[nowx][nowy] = 'v';
              break;
            }
            case 1: {
              ans[i][j] = 'v';
              ans[nowx][nowy] = '^';
              break;
            }
            case 2: {
              ans[i][j] = '<';
              ans[nowx][nowy] = '>';
              break;
            }
            case 3: {
              ans[i][j] = '>';
              ans[nowx][nowy] = '<';
              break;
            }
          }
          break;
        }
      }
    } else
      break;
  }
  if (cnt == n * m) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) printf("%c", ans[i][j]);
      printf("\n");
    }
  } else
    printf("Not unique\n");
  return 0;
}
