#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2000 + 10;
int n, m;
char s[MAX_N][MAX_N];
vector<int> G[MAX_N * MAX_N], l;
int deg[MAX_N * MAX_N];
int mark[MAX_N * MAX_N];
char ans[MAX_N][MAX_N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%s", (s[i] + 1));
    s[i][0] = '#';
    s[i][m + 1] = '#';
  }
  for (int i = 0; i <= m + 1; i++) {
    s[0][i] = '#';
    s[n + 1][i] = '#';
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      ans[i][j] = s[i][j];
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++)
      if (s[i][j] == '.') {
        if (s[i][j + 1] == '.') {
          G[(i - 1) * m + j].push_back((i - 1) * m + j + 1);
          deg[(i - 1) * m + j]++;
        }
        if (s[i][j - 1] == '.') {
          G[(i - 1) * m + j].push_back((i - 1) * m + j - 1);
          deg[(i - 1) * m + j]++;
        }
        if (s[i + 1][j] == '.') {
          G[(i - 1) * m + j].push_back((i - 1 + 1) * m + j);
          deg[(i - 1) * m + j]++;
        }
        if (s[i - 1][j] == '.') {
          G[(i - 1) * m + j].push_back((i - 1 - 1) * m + j);
          deg[(i - 1) * m + j]++;
        }
      }
  }
  for (int i = 1; i <= n * m; i++) {
    if (deg[i] == 1) {
      l.push_back(i);
    }
  }
  for (int i = 0; i < l.size(); i++)
    if (mark[l[i]] == 0) {
      int u = l[i];
      int v = -1;
      for (int j = 0; j < G[u].size(); j++) {
        if (mark[G[u][j]] == 0) {
          v = G[u][j];
          break;
        }
      }
      if (v == -1) {
        printf("Not unique\n");
        return 0;
      }
      for (int j = 0; j < G[v].size(); j++) {
        int k = G[v][j];
        if (mark[k] == 0) {
          deg[k]--;
          if (deg[k] == 1) {
            l.push_back(k);
          }
        }
      }
      deg[v] = 0;
      deg[u] = 0;
      mark[u] = 1;
      mark[v] = 1;
      int x, xx, y, yy;
      if (u % m == 0) {
        x = u / m;
        y = m;
      } else {
        x = (u / m) + 1;
        y = u - ((u / m) * m);
      }
      if (v % m == 0) {
        xx = v / m;
        yy = m;
      } else {
        xx = (v / m) + 1;
        yy = v - ((v / m) * m);
      }
      if (x == xx) {
        ans[x][min(y, yy)] = '<';
        ans[x][max(y, yy)] = '>';
      } else {
        ans[min(x, xx)][y] = '^';
        ans[max(x, xx)][y] = 'v';
      }
    }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (ans[i][j] == '.') {
        printf("Not unique\n");
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      printf("%c", ans[i][j]);
    }
    printf("\n");
  }
}
