#include <bits/stdc++.h>
using namespace std;
const int MAX = 2003;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const string S[] = {"<>", "^v", "><", "v^"};
int deg[MAX][MAX];
bool done;
string s[MAX];
bool visited[MAX][MAX];
queue<pair<int, int> > q;
int n, m;
bool valid(int x, int y) {
  if (x <= 0 || x > n || y <= 0 || y > m) return false;
  return s[x][y] == '.';
}
void func() {
  done = true;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      for (int k = 0; k < 4; k++) {
        if (valid(i + dx[k], j + dy[k]) && valid(i, j)) deg[i][j]++;
        done = done & (s[i][j] != '.');
      }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (deg[i][j] == 1) q.push(make_pair(i, j));
  while (!q.empty()) {
    done = true;
    pair<int, int> temp = q.front();
    q.pop();
    for (int k = 0; k < 4; k++) {
      int x = temp.first + dx[k];
      int y = temp.second + dy[k];
      if (valid(x, y) && !visited[x][y]) {
        visited[x][y] = true;
        visited[temp.first][temp.second] = true;
        for (int j = 0; j < 4; j++) {
          int xx = x + dx[j];
          int yy = y + dy[j];
          if (valid(xx, yy) && !visited[xx][yy]) {
            deg[xx][yy]--;
            if (deg[xx][yy] == 1) q.push(make_pair(xx, yy));
          }
        }
        s[temp.first][temp.second] = S[k][0];
        s[x][y] = S[k][1];
        break;
      }
    }
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      done = done & (s[i][j] == '.' ? visited[i][j] : true);
  if (!done) {
    cout << "Not unique" << endl;
    return;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) cout << s[i][j];
    cout << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> s[i];
    s[i] = "#" + s[i];
  }
  func();
  return 0;
}
