#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
int n, m;
bool check(int x, int y) {
  if (x >= 1 && x <= n && y >= 1 && y <= m) return true;
}
int degree[2005][2005];
char s[2005][2005];
queue<pair<int, int> > Q;
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 k = 0; k < 4; k++) {
          int x = i + dx[k], y = j + dy[k];
          if (check(x, y) && s[x][y] == '.') degree[i][j]++;
        }
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (degree[i][j] == 1) {
        Q.push(make_pair(i, j));
      }
    }
  while (!Q.empty()) {
    pair<int, int> x = Q.front();
    Q.pop();
    int i = x.first, j = x.second;
    for (int k = 0; k < 4; k++) {
      int x = i + dx[k], y = j + dy[k];
      if (check(x, y) && s[x][y] == '.') {
        if (k == 0) s[i][j] = '<', s[x][y] = '>';
        if (k == 1) s[i][j] = '^', s[x][y] = 'v';
        if (k == 2) s[x][y] = '<', s[i][j] = '>';
        if (k == 3) s[x][y] = '^', s[i][j] = 'v';
        degree[i][j] = -1;
        degree[x][y] = -1;
        for (int l = 0; l < 4; l++) {
          int xx = x + dx[l], yy = y + dy[l];
          if (check(xx, yy) && s[xx][yy] == '.') {
            degree[xx][yy]--;
            if (degree[xx][yy] == 1) {
              Q.push(make_pair(xx, yy));
            }
          }
        }
      }
    }
  }
  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);
  return 0;
}
