#include <bits/stdc++.h>
using namespace std;
inline char getc() {
  register char c = getchar();
  while (c != '.' && c != '*') c = getchar();
  return c;
}
int n, m;
char c[2010][2010];
int deg[2010][2010];
int mx[4] = {0, 0, 1, -1};
int my[4] = {1, -1, 0, 0};
char cx[4] = {'<', '>', '^', 'v'};
char cy[4] = {'>', '<', 'v', '^'};
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) c[i][j] = getc();
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j)
      for (int k = 0; k < 4; ++k)
        if (c[i + mx[k]][j + my[k]] != 0 && c[i + mx[k]][j + my[k]] != '*')
          ++deg[i][j];
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (deg[i][j] == 0 && c[i][j] == '.') {
        puts("Not unique");
        return 0;
      }
    }
  }
  queue<pair<int, int> > q;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j)
      if (c[i][j] == '.' && deg[i][j] == 1) q.push(make_pair(i, j));
  while (!q.empty()) {
    pair<int, int> k = q.front();
    q.pop();
    for (int i = 0; i < 4; ++i) {
      if (c[k.first + mx[i]][k.second + my[i]] == '.') {
        c[k.first][k.second] = cx[i];
        c[k.first + mx[i]][k.second + my[i]] = cy[i];
        int xx = k.first + mx[i], yy = k.second + my[i];
        for (int j = 0; j < 4; ++j) {
          if (c[xx + mx[j]][yy + my[j]] == '.') {
            --deg[xx + mx[j]][yy + my[j]];
            if (deg[xx + mx[j]][yy + my[j]] == 1) {
              q.push(make_pair(xx + mx[j], yy + my[j]));
            }
          }
        }
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (c[i][j] == '.') {
        puts("Not unique");
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      putchar(c[i][j]);
    }
    puts("");
  }
  return 0;
}
