#include <bits/stdc++.h>
using namespace std;
char s[(2000 + 100)][(2000 + 100)];
int num[(2000 + 100)][(2000 + 100)];
int n, m;
bool out(int x, int y) {
  if (x < 0 || x >= n || y < 0 || y >= m) return 1;
  return 0;
}
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, -1, 1};
int cal(int x, int y) {
  int cnt = 0;
  for (int i = 0; i < 4; ++i) {
    int nx = x + dx[i];
    int ny = y + dy[i];
    if (out(nx, ny) || s[nx][ny] == '*') continue;
    ++cnt;
  }
  return cnt;
}
pair<int, int> Q[(2000 + 100) * (2000 + 100)];
char get(int x) {
  switch (x) {
    case 0:
      return '<';
    case 1:
      return '>';
    case 2:
      return '^';
    case 3:
      return 'v';
  }
}
int main() {
  while (~scanf("%d%d", &n, &m)) {
    for (int i = 0; i < n; ++i) scanf("%s", s[i]);
    int head = 0, tail = 0;
    memset(num, -1, sizeof(num));
    int cc = 0;
    bool e = 1;
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < m; ++j)
        if (s[i][j] != '*') {
          num[i][j] = cal(i, j);
          if (num[i][j] == 1) Q[tail++] = make_pair(i, j);
          ++cc;
          if (num[i][j] == 0) e = 0;
        }
    if ((tail == 0 && cc != 0) || !e)
      puts("Not unique");
    else {
      int cnt = 0;
      while (head < tail) {
        int x = Q[head].first, y = Q[head++].second;
        if (num[x][y] != 1) continue;
        for (int i = 0; i < 4; ++i) {
          int nx = x + dx[i];
          int ny = y + dy[i];
          if (out(nx, ny) || s[nx][ny] != '.') continue;
          if (nx != x) {
            if (nx > x)
              s[x][y] = '^', s[nx][ny] = 'v';
            else
              s[x][y] = 'v', s[nx][ny] = '^';
          } else {
            if (ny > y)
              s[x][y] = '<', s[nx][ny] = '>';
            else
              s[x][y] = '>', s[nx][ny] = '<';
          }
          for (int i = 0; i < 4; ++i) {
            int xx = nx + dx[i];
            int yy = ny + dy[i];
            if (!out(xx, yy) && s[xx][yy] == '.' && num[xx][yy] > 0)
              --num[xx][yy];
            if (num[xx][yy] == 1 && s[xx][yy] == '.')
              Q[tail++] = make_pair(xx, yy);
          }
          num[x][y] = 0;
          break;
        }
      }
      for (int i = 0; i < n; ++i)
        for (int j = 0; j < m; ++j)
          if (s[i][j] == '.') ++cnt;
      if (cnt == 0) {
        for (int i = 0; i < n; ++i) {
          printf("%s\n", s[i]);
        }
      } else
        puts("Not unique");
    }
  }
}
