#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<vector<char> > arr;
vector<vector<int> > dp;
queue<pair<int, int> > q;
void check(int i, int j) {
  if (i < 0 || i >= n || j < 0 || j >= m) {
    return;
  }
  if (arr[i][j] != '.') {
    return;
  }
  dp[i][j] = 0;
  if (i > 0 && arr[i - 1][j] == '.') {
    dp[i][j]++;
  }
  if (j > 0 && arr[i][j - 1] == '.') {
    dp[i][j]++;
  }
  if (i + 1 < n && arr[i + 1][j] == '.') {
    dp[i][j]++;
  }
  if (j + 1 < m && arr[i][j + 1] == '.') {
    dp[i][j]++;
  }
  if (dp[i][j] == 1) {
    q.push(make_pair(i, j));
  }
}
void check1(int i, int j) {
  check(i - 1, j);
  check(i + 1, j);
  check(i, j - 1);
  check(i, j + 1);
}
int main(int argc, char *argv[]) {
  scanf("%d%d", &n, &m);
  arr.resize(n);
  dp.resize(n);
  for (int i = 0; i < n; ++i) {
    arr[i].resize(m);
    dp[i].resize(m, 0);
    char s[m + 1];
    scanf("%s", s);
    for (int j = 0; j < m; ++j) {
      arr[i][j] = s[j];
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (arr[i][j] != '.') {
        continue;
      }
      if (i > 0 && arr[i - 1][j] == '.') {
        dp[i][j]++;
      }
      if (j > 0 && arr[i][j - 1] == '.') {
        dp[i][j]++;
      }
      if (i + 1 < n && arr[i + 1][j] == '.') {
        dp[i][j]++;
      }
      if (j + 1 < m && arr[i][j + 1] == '.') {
        dp[i][j]++;
      }
      if (dp[i][j] == 1) {
        q.push(make_pair(i, j));
      }
    }
  }
  while (!q.empty()) {
    int x = q.front().first, y = q.front().second;
    q.pop();
    if (arr[x][y] == '.' && dp[x][y] == 1) {
      if (x > 0 && arr[x - 1][y] == '.') {
        arr[x][y] = 'v';
        arr[x - 1][y] = '^';
        check1(x, y);
        check1(x - 1, y);
      } else if (x + 1 < n && arr[x + 1][y] == '.') {
        arr[x][y] = '^';
        arr[x + 1][y] = 'v';
        check1(x, y);
        check1(x + 1, y);
      } else if (y > 0 && arr[x][y - 1] == '.') {
        arr[x][y] = '>';
        arr[x][y - 1] = '<';
        check1(x, y);
        check1(x, y - 1);
      } else {
        arr[x][y] = '<';
        arr[x][y + 1] = '>';
        check1(x, y);
        check1(x, y + 1);
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (arr[i][j] == '.') {
        printf("Not unique");
        return 0;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      printf("%c", arr[i][j]);
    }
    printf("\n");
  }
  return 0;
}
