#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
int x[] = {0, 1, 0, -1}, n, m;
int y[] = {1, 0, -1, 0};
char C[] = {'>', 'v', '<', '^'};
char ar[2001][2001];
int get_edges(int X, int Y) {
  int ans = 0;
  for (int i = 0; i < 4; i++)
    if (X + x[i] >= 0 && X + x[i] < n && Y + y[i] >= 0 && Y + y[i] < m &&
        ar[X + x[i]][Y + y[i]] == '.')
      ans++;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  while (scanf("%d %d", &n, &m) == 2) {
    getchar();
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) scanf("%c", &ar[i][j]);
      getchar();
    }
    queue<pair<int, int> > Q;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++)
        if (ar[i][j] == '.' && get_edges(i, j) == 1) Q.push(make_pair(i, j));
    pair<int, int> p;
    while (!Q.empty()) {
      p = Q.front();
      Q.pop();
      for (int i = 0; i < 4; i++) {
        int X = x[i] + p.first, Y = y[i] + p.second;
        if (ar[X][Y] == '.') {
          ar[X][Y] = C[i];
          ar[p.first][p.second] = C[(i + 2) % 4];
          for (int j = 0; j < 4; j++) {
            int xx = X + x[j], yy = Y + y[j];
            if (ar[xx][yy] == '.' && get_edges(xx, yy) == 1)
              Q.push(make_pair(xx, yy));
          }
          break;
        }
      }
    }
    bool check = true;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++)
        if (ar[i][j] == '.') check = false;
    if (check) {
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) cout << ar[i][j];
        cout << endl;
      }
    } else
      puts("Not unique");
  }
  return 0;
}
