#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
char mp[N][N];
int deg[N][N];
int cnt[2], n, m;
int dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0};
string str = "><v^", tmp = "<>^v";
bool check(int x, int y) { return x >= 1 && x <= n && y >= 1 && y <= m; }
int main() {
  ios ::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = (int)(1); i <= (int)(n); ++i) {
    cin >> (mp[i] + 1);
  }
  for (int i = (int)(1); i <= (int)(n); ++i) {
    for (int j = (int)(1); j <= (int)(m); ++j) {
      if (mp[i][j] == '.') {
        if ((i + j) & 1) {
          cnt[1]++;
        } else
          cnt[0]++;
      }
    }
  }
  if (cnt[0] != cnt[1]) {
    cout << "Not unique" << endl;
    return 0;
  } else {
    queue<int> q;
    for (int i = (int)(1); i <= (int)(n); ++i) {
      for (int j = (int)(1); j <= (int)(m); ++j) {
        if (mp[i][j] == '.') {
          for (int k = 0; k < (int)(4); ++k) {
            int x = i + dx[k];
            int y = j + dy[k];
            if (check(x, y) && mp[x][y] == '.') {
              deg[i][j]++;
            }
          }
          if (deg[i][j] == 1) {
            q.push(i);
            q.push(j);
          }
        }
      }
    }
    while (q.size()) {
      int x = q.front();
      q.pop();
      int y = q.front();
      q.pop();
      for (int k = 0; k < (int)(4); ++k) {
        int tx = x + dx[k];
        int ty = y + dy[k];
        if (check(tx, ty) && mp[tx][ty] == '.' && deg[tx][ty] > 0) {
          mp[x][y] = tmp[k];
          mp[tx][ty] = str[k];
          deg[tx][ty] = 0;
          deg[x][y] = 0;
          for (int t = 0; t < (int)(4); ++t) {
            int ax = tx + dx[t];
            int ay = ty + dy[t];
            if (check(ax, ay) && mp[ax][ay] == '.' && deg[ax][ay] > 0) {
              deg[ax][ay]--;
              if (deg[ax][ay] == 1) {
                q.push(ax);
                q.push(ay);
              }
            }
          }
          break;
        }
      }
    }
    for (int i = (int)(1); i <= (int)(n); ++i) {
      for (int j = (int)(1); j <= (int)(m); ++j) {
        if (deg[i][j] > 0 || mp[i][j] == '.') {
          cout << "Not unique" << endl;
          return 0;
        }
      }
    }
    for (int i = (int)(1); i <= (int)(n); ++i) {
      cout << mp[i] + 1 << endl;
    }
  }
  return 0;
}
