#include <bits/stdc++.h>
const int inf = (1 << 30) - 10;
using namespace std;
const int maxx = 2000 + 10;
int dir[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
int vis[maxx][maxx];
char str[maxx];
int n, m;
int cnt;
void dfs(int x, int y) {
  if (x < 1 || x > n || y < 1 || y > m || vis[x][y]) return;
  int dx = -1;
  int dy = -1;
  int kjudge = 0;
  for (int dd = 0; dd < 4; ++dd) {
    int hx = x + dir[dd][0];
    int hy = y + dir[dd][1];
    if (vis[hx][hy] == 0) {
      if (kjudge) {
        kjudge = 0;
        break;
      } else
        kjudge = dd + 1;
      dx = dir[dd][0];
      dy = dir[dd][1];
    }
  }
  if (kjudge) {
    if (kjudge == 2) {
      vis[x][y] = 3;
      vis[x + dx][y + dy] = 2;
    } else if (kjudge == 1) {
      vis[x][y] = 2;
      vis[x + dx][y + dy] = 3;
    } else if (kjudge == 3) {
      vis[x][y] = 5;
      vis[x + dx][y + dy] = 4;
    } else if (kjudge == 4) {
      vis[x][y] = 4;
      vis[x + dx][y + dy] = 5;
    }
    cnt += 2;
    for (int i = 0; i < 4; ++i)
      dfs(x + dir[kjudge - 1][0] + dir[i][0],
          y + dir[kjudge - 1][1] + dir[i][1]);
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i <= n + 1; ++i) {
    for (int j = 0; j <= m + 1; ++j) {
      vis[i][j] = 1;
    }
  }
  cnt = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%s", str);
    for (int j = 0; j < m; ++j) {
      if (str[j] == '.') {
        vis[i][j + 1] = 0;
      } else {
        cnt++;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      dfs(i, j);
    }
  }
  if (cnt != n * m) {
    cout << "Not unique" << endl;
  } else {
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= m; ++j) {
        if (vis[i][j] == 1) {
          cout << "*";
        } else if (vis[i][j] == 2) {
          cout << "^";
        } else if (vis[i][j] == 3) {
          cout << "v";
        } else if (vis[i][j] == 4) {
          cout << ">";
        } else if (vis[i][j] == 5) {
          cout << "<";
        }
      }
      cout << endl;
    }
  }
  return 0;
}
