#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M, X[] = {0, 0, 1, -1}, Y[] = {1, -1, 0, 0};
  cin >> N >> M;
  string S[N], arrow = "<>^v";
  for (int i = 0; i < N; i++) {
    cin >> S[i];
  }
  int cnt[N][M];
  queue<pair<pair<int, int>, int>> proc;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      cnt[i][j] = 0;
      if (S[i][j] != '.') continue;
      int dir = -1;
      for (int k = 0; k < 4; k++) {
        int x = i + X[k], y = j + Y[k];
        if (x < N && x >= 0 && y < M && y >= 0 && S[x][y] == '.') {
          cnt[i][j]++;
          dir = k;
        }
      }
      if (cnt[i][j] == 1) {
        proc.push({{i, j}, dir});
      }
    }
  }
  while (proc.size()) {
    int sz = proc.size();
    for (int i = 0; i < sz; i++) {
      pair<pair<int, int>, int> top = proc.front();
      int x = top.first.first, y = top.first.second, dir = top.second;
      proc.pop();
      if (S[x][y] != '.' || cnt[x][y] != 1) continue;
      S[x][y] = arrow[dir];
      x += X[dir], y += Y[dir], dir = dir + (dir & 1 ? -1 : 1);
      S[x][y] = arrow[dir];
      for (int k = 0; k < 4; k++) {
        if (x + X[k] >= N || x + X[k] < 0 || y + Y[k] >= M || y + Y[k] < 0 ||
            S[x + X[k]][y + Y[k]] != '.')
          continue;
        cnt[x + X[k]][y + Y[k]]--;
        if (cnt[x + X[k]][y + Y[k]] == 1) {
          for (int kk = 0; kk < 4; kk++) {
            int xx = x + X[k] + X[kk], yy = y + Y[k] + Y[kk];
            if (xx < N && xx >= 0 && yy < M && yy >= 0 && S[xx][yy] == '.') {
              proc.push({{x + X[k], y + Y[k]}, kk});
              break;
            }
          }
        }
      }
    }
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      if (S[i][j] == '.') {
        cout << "Not unique\n";
        return 0;
      }
    }
  }
  for (int i = 0; i < N; i++) cout << S[i] << '\n';
}
