#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int INF = 0x3fffffff;
const double EPS = 1e-8;
const double PI = 2 * asin(1);
int g_x, g_y;
vector<string> vs;
vector<int> vi_degree;
vector<vector<int>> vvi_edge;
void pretreat() { ; }
bool input() {
  cin >> g_x >> g_y;
  if (cin.eof()) return false;
  vs.clear(), vvi_edge.clear(), vi_degree.clear();
  vvi_edge.resize(g_x * g_y), vi_degree.resize(g_x * g_y);
  string s;
  for (int i = 0; i < g_x; ++i) {
    cin >> s;
    vs.push_back(s);
  }
  return true;
}
void solve() {
  bool f = false;
  for (int i = 0; i < g_x; ++i) {
    for (int j = 0; j < g_y; ++j) {
      int u = i * g_y + j, v;
      if (vs[i][j] == '.') {
        f = true;
        if (i >= 1 && vs[i - 1][j] == '.') {
          v = (i - 1) * g_y + j;
          vvi_edge[u].push_back(v);
          ++vi_degree[u];
        }
        if (j >= 1 && vs[i][j - 1] == '.') {
          v = i * g_y + j - 1;
          vvi_edge[u].push_back(v);
          ++vi_degree[u];
        }
        if (j < g_y - 1 && vs[i][j + 1] == '.') {
          v = i * g_y + j + 1;
          vvi_edge[u].push_back(v);
          ++vi_degree[u];
        }
        if (i < g_x - 1 && vs[i + 1][j] == '.') {
          v = (i + 1) * g_y + j;
          vvi_edge[u].push_back(v);
          ++vi_degree[u];
        }
      }
    }
  }
  if (!f) {
    for (auto &s : vs) cout << s << endl;
    return;
  }
  vector<string> vs_t;
  vs_t = vs;
  queue<int> qi;
  for (int i = 0; i < g_x * g_y; ++i) {
    if (vi_degree[i] == 1) qi.push(i);
  }
  if (qi.empty()) {
    puts("Not unique");
    return;
  }
  while (!qi.empty()) {
    int u = qi.front();
    qi.pop();
    for (int i = 0; i < vvi_edge[u].size(); ++i) {
      int v = vvi_edge[u][i];
      if (vi_degree[v] > 0) {
        vi_degree[v] = 0;
        if (u < v) {
          if ((u / g_y == v / g_y) && (u % g_y == (v % g_y - 1)))
            vs_t[u / g_y][u % g_y] = '<', vs_t[v / g_y][v % g_y] = '>';
          else
            vs_t[u / g_y][u % g_y] = '^', vs_t[v / g_y][v % g_y] = 'v';
        } else {
          if ((u / g_y == v / g_y) && (u % g_y == (v % g_y + 1)))
            vs_t[v / g_y][v % g_y] = '<', vs_t[u / g_y][u % g_y] = '>';
          else
            vs_t[v / g_y][v % g_y] = '^', vs_t[u / g_y][u % g_y] = 'v';
        }
        for (int j = 0; j < vvi_edge[v].size(); ++j) {
          int vv = vvi_edge[v][j];
          if (vi_degree[vv] > 0) {
            --vi_degree[vv];
            if (vi_degree[vv] == 1) qi.push(vv);
          }
        }
      }
    }
  }
  f = true;
  for (int i = 0; i < g_x; ++i) {
    for (int j = 0; j < g_y; ++j) {
      if (vs_t[i][j] == '.') {
        f = false;
        break;
      }
    }
    if (!f) break;
  }
  if (!f) {
    puts("Not unique");
    return;
  }
  for (auto &s : vs_t) cout << s << endl;
}
int main() {
  pretreat();
  while (input()) {
    solve();
  }
  return 0;
}
