#include <bits/stdc++.h>
using namespace std;
pair<int, int> q[2002 * 2002];
int n, m, g[2002][2002], qc;
char s[2002][2002];
int di[] = {1, -1, 0, 0};
int dj[] = {0, 0, 1, -1};
char c1[] = {'^', 'v', '<', '>'};
char c2[] = {'v', '^', '>', '<'};
bool isok(int a, int b) { return a >= 0 && b >= 0 && a < n && b < m; }
void borra(int i, int j) {
  for (int m = (0); m < (4); m++)
    if (isok(i + di[m], j + dj[m]) && s[i + di[m]][j + dj[m]] == '.') {
      if ((--g[i + di[m]][j + dj[m]]) == 1) {
        q[qc++] = pair<int, int>(i + di[m], j + dj[m]);
      }
    }
}
int main() {
  while (cin >> n >> m) {
    for (int i = (0); i < (n); i++) cin >> s[i];
    memset(g, 0, sizeof(g));
    for (int i = (0); i < (n); i++)
      for (int j = (0); j < (m); j++)
        if (s[i][j] == '.') {
          for (int m = (0); m < (4); m++)
            if (isok(i + di[m], j + dj[m]) && s[i + di[m]][j + dj[m]] == '.')
              g[i + di[m]][j + dj[m]]++;
        }
    for (int i = (0); i < (n); i++)
      for (int j = (0); j < (m); j++)
        if (s[i][j] == '.' && g[i][j] == 1) q[qc++] = pair<int, int>(i, j);
    while (qc) {
      pair<int, int> e = q[--qc];
      for (int m = (0); m < (4); m++) {
        pair<int, int> ne = pair<int, int>(e.first + di[m], e.second + dj[m]);
        if (isok(ne.first, ne.second) && s[ne.first][ne.second] == '.') {
          s[e.first][e.second] = c1[m];
          s[ne.first][ne.second] = c2[m];
          borra(e.first, e.second);
          borra(ne.first, ne.second);
          break;
        }
      }
    }
    bool f = true;
    for (int i = (0); i < (n); i++)
      for (int j = (0); j < (m); j++)
        if (s[i][j] == '.') f = false;
    if (f) {
      for (int i = (0); i < (n); i++) cout << s[i] << endl;
    } else {
      cout << "Not unique\n";
    }
  }
  return 0;
}
