#include <bits/stdc++.h>
using namespace std;
int degree[2010][2010];
vector<string> arr;
int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};
int poss(int i, int j, int r, int c) {
  if (i >= 0 && i < r && j >= 0 && j < c)
    return 1;
  else
    return 0;
}
vector<pair<int, int> > edge[2010][2010];
int main() {
  int n, m;
  cin >> n >> m;
  arr.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      degree[i][j] = 0;
      if (arr[i][j] == '*') {
        continue;
      }
      for (int k = 0; k < 4; k++) {
        int nx = i + dx[k];
        int ny = j + dy[k];
        if (poss(nx, ny, n, m) && arr[nx][ny] == '.') {
          edge[i][j].push_back(make_pair(nx, ny));
          degree[i][j] += 1;
        }
      }
    }
  }
  queue<pair<int, int> > q;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (degree[i][j] == 1) {
        q.push(make_pair(i, j));
      }
    }
  }
  while (!q.empty()) {
    pair<int, int> temp = q.front();
    q.pop();
    if (degree[temp.first][temp.second] != 1) continue;
    for (int d = 0; d < 4; d++) {
      int nx = temp.first + dx[d];
      int ny = temp.second + dy[d];
      if (!poss(nx, ny, n, m)) continue;
      if (arr[nx][ny] != '.') continue;
      degree[temp.first][temp.second] = 0;
      degree[nx][ny] = 0;
      if (dx[d] == -1) {
        arr[nx][ny] = '^';
        arr[temp.first][temp.second] = 'v';
      } else if (dx[d] == 1) {
        arr[nx][ny] = 'v';
        arr[temp.first][temp.second] = '^';
      } else if (dy[d] == 1) {
        arr[nx][ny] = '>';
        arr[temp.first][temp.second] = '<';
      } else {
        arr[nx][ny] = '<';
        arr[temp.first][temp.second] = '>';
      }
      for (int i = 0; i < edge[nx][ny].size(); i++) {
        pair<int, int> f = edge[nx][ny][i];
        degree[f.first][f.second] -= 1;
        if (degree[f.first][f.second] == 1) {
          q.push(f);
        }
      }
    }
  }
  int flag = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (arr[i][j] == '.') {
        flag = 0;
      }
    }
  }
  if (!flag) {
    cout << "Not unique" << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    cout << arr[i] << endl;
  }
  return 0;
}
