#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int N, M;
  cin >> N >> M;
  vector<string> s;
  vector<vector<long long int> > cnt(N + 2, vector<long long int>(M + 2, 0));
  string dum = "";
  for (int i = 0; i <= M + 1; i++) {
    dum += '*';
  }
  s.push_back(dum);
  for (int i = 1; i <= N; i++) {
    cin >> dum;
    dum = '*' + dum + '*';
    s.push_back(dum);
  }
  dum = "";
  for (int i = 0; i <= M + 1; i++) {
    dum += '*';
  }
  s.push_back(dum);
  queue<pair<long long int, long long int> > q;
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j <= M; j++) {
      if (s[i][j] == '.') {
        cnt[i][j] = (s[i - 1][j] == '.') + (s[i + 1][j] == '.') +
                    (s[i][j - 1] == '.') + (s[i][j + 1] == '.');
      }
      if (cnt[i][j] == 1) {
        q.push(make_pair(i, j));
      }
    }
  }
  pair<long long int, long long int> d;
  long long int x, y, a, b;
  while (!q.empty()) {
    d = q.front();
    q.pop();
    x = d.first;
    y = d.second;
    if (s[x - 1][y] == '.') {
      s[x][y] = 'v';
      s[x - 1][y] = '^';
      long long int vals[6][2] = {{x + 1, y}, {x, y - 1},     {x, y + 1},
                                  {x - 2, y}, {x - 1, y - 1}, {x - 1, y + 1}};
      for (int i = 0; i < 6; i++) {
        a = vals[i][0], b = vals[i][1];
        if (s[a][b] == '.') {
          if (cnt[a][b]) cnt[a][b]--;
          if (cnt[a][b] == 1) q.push(make_pair(a, b));
        }
      }
    } else if (s[x + 1][y] == '.') {
      s[x][y] = '^';
      s[x + 1][y] = 'v';
      long long int vals[6][2] = {{x - 1, y}, {x, y - 1},     {x, y + 1},
                                  {x + 2, y}, {x + 1, y - 1}, {x + 1, y + 1}};
      for (int i = 0; i < 6; i++) {
        a = vals[i][0], b = vals[i][1];
        if (s[a][b] == '.') {
          if (cnt[a][b]) cnt[a][b]--;
          if (cnt[a][b] == 1) q.push(make_pair(a, b));
        }
      }
    } else if (s[x][y + 1] == '.') {
      s[x][y] = '<';
      s[x][y + 1] = '>';
      long long int vals[6][2] = {{x + 1, y}, {x - 1, y},     {x, y - 1},
                                  {x, y + 2}, {x - 1, y + 1}, {x + 1, y + 1}};
      for (int i = 0; i < 6; i++) {
        a = vals[i][0], b = vals[i][1];
        if (s[a][b] == '.') {
          if (cnt[a][b]) cnt[a][b]--;
          if (cnt[a][b] == 1) q.push(make_pair(a, b));
        }
      }
    } else if (s[x][y - 1] == '.') {
      s[x][y] = '>';
      s[x][y - 1] = '<';
      long long int vals[6][2] = {{x + 1, y}, {x - 1, y},     {x, y + 1},
                                  {x, y - 2}, {x - 1, y - 1}, {x + 1, y - 1}};
      for (int i = 0; i < 6; i++) {
        a = vals[i][0], b = vals[i][1];
        if (s[a][b] == '.') {
          if (cnt[a][b]) cnt[a][b]--;
          if (cnt[a][b] == 1) q.push(make_pair(a, b));
        }
      }
    }
  }
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j <= M; j++) {
      if (s[i][j] == '.') {
        cout << "Not unique" << endl;
        return 0;
      }
    }
  }
  for (int i = 1; i <= N; i++) {
    cout << s[i].substr(1, M) << endl;
  }
}
