#include <bits/stdc++.h>
using namespace std;
int n, m, match[2010][2010], deg[2010][2010], xs[5] = {0, -1, 0, 1},
                                              ys[5] = {1, 0, -1, 0};
string s[2100];
bool mark[2010][2010], mark2[2010][2010];
bool check(int i, int j) {
  if (i >= n || j >= m || i < 0 || j < 0 || s[i][j] == '*') return 0;
  return 1;
}
void dfs(int i, int j) {
  mark[i][j] = 1;
  for (int g = 0; g < 4; g++) {
    int x2 = i + xs[g], y2 = j + ys[g];
    if (check(x2, y2)) {
      deg[i][j]++;
      if (!mark[x2][y2]) dfs(x2, y2);
    }
  }
}
pair<int, int> find(int x, int y) {
  for (int i = 0; i < 4; i++) {
    int x2 = x + xs[i], y2 = y + ys[i];
    if (check(x2, y2) && !mark2[x2][y2]) return make_pair(x2, y2);
  }
}
void work(int x, int y, int i, int j) {
  if (!check(x, y)) return;
  mark2[i][j] = 1;
  deg[x][y]--;
}
void BFS(int i, int j) {
  if (deg[i][j] != 1 || match[i][j] != -1 || !check(i, j) || mark2[i][j])
    return;
  pair<int, int> p = find(i, j);
  match[i][j] = p.first * m + p.second;
  match[p.first][p.second] = i * m + j;
  work(i + 1, j, i, j);
  work(i - 1, j, i, j);
  work(i, j + 1, i, j);
  work(i, j - 1, i, j);
  int x = p.first, y = p.second;
  work(x + 1, y, x, y);
  work(x, y + 1, x, y);
  work(x - 1, y, x, y);
  work(x, y - 1, x, y);
  BFS(x + 1, y);
  BFS(x - 1, y);
  BFS(x, y + 1);
  BFS(x, y - 1);
  BFS(i + 1, j);
  BFS(i - 1, j);
  BFS(i, j + 1);
  BFS(i, j - 1);
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (s[i][j] == '.' && !mark[i][j]) dfs(i, j);
  for (int i = 0; i < n; i++) fill(match[i], match[i] + m, -1);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (match[i][j] == -1) BFS(i, j);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (match[i][j] == -1 && s[i][j] == '.') {
        cout << "Not unique" << endl;
        return 0;
      }
    }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (s[i][j] == '.') {
        int x = match[i][j];
        int y = i * m + j;
        if (x - y == -m)
          s[i][j] = 'v';
        else if (x - y == m)
          s[i][j] = '^';
        else if (x - y == 1)
          s[i][j] = '<';
        else if (x - y == -1)
          s[i][j] = '>';
      }
  for (int i = 0; i < n; i++) cout << s[i] << endl;
  return 0;
}
