#include <bits/stdc++.h>
using namespace std;
vector<vector<char> > ans;
int N, M;
void put_ans(int v, int w) {
  int i = v / M;
  int j = v % M;
  int i1 = w / M;
  int j1 = w % M;
  if (i1 == i - 1) {
    ans[i][j] = 'v';
    ans[i1][j1] = '^';
  } else if (i1 == i + 1) {
    ans[i][j] = '^';
    ans[i1][j1] = 'v';
  } else if (j1 == j - 1) {
    ans[i][j] = '>';
    ans[i1][j1] = '<';
  } else {
    ans[i][j] = '<';
    ans[i1][j1] = '>';
  }
}
int add(int v, pair<int, int> z) {
  int i = v / M;
  int j = v % M;
  i += z.first;
  j += z.second;
  if (0 <= i and i < N and 0 <= j and j < M) {
    return i * M + j;
  }
  return -1;
}
bool can(int v) { return (v != -1); }
int main() {
  scanf("%d %d", &N, &M);
  vector<vector<int> > A(N * M);
  ans.assign(N, vector<char>(M, '*'));
  vector<vector<int> > B(N, vector<int>(M));
  vector<int> used(N * M, 1);
  vector<pair<int, int> > go(4);
  go[0] = make_pair(-1, 0);
  go[1] = make_pair(0, -1);
  go[2] = make_pair(1, 0);
  go[3] = make_pair(0, 1);
  int v = 0;
  while (v < N * M) {
    char c;
    scanf("%c", &c);
    if (!(c == '.' or c == '*')) {
      continue;
    }
    if (c == '.') {
      int i = v / M;
      int j = v % M;
      B[i][j] = 1;
      used[i * M + j] = 0;
    }
    v++;
  }
  vector<int> Deg(N * M);
  queue<int> q;
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < M; ++j) {
      if (B[i][j] == 0) {
        continue;
      }
      int cnt = 0;
      int v = i * M + j;
      if (i != 0 && B[i - 1][j]) {
        cnt += 1;
      }
      if (j != 0 && B[i][j - 1]) {
        cnt++;
      }
      if (j < M - 1 && B[i][j + 1]) {
        cnt++;
      }
      if (i < N - 1 && B[i + 1][j]) {
        cnt++;
      }
      Deg[i * M + j] = cnt;
      if (Deg[i * M + j] == 1) {
        q.push(i * M + j);
      }
    }
  }
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    if (used[v]) {
      continue;
    }
    if (!Deg[v]) {
      cout << "Not unique" << endl;
      return 0;
    }
    int w;
    for (auto z : go) {
      int u = add(v, z);
      if (can(u) && !used[u]) {
        w = u;
        break;
      }
    }
    used[v] = 1;
    used[w] = 1;
    put_ans(v, w);
    for (auto z : go) {
      int u = add(w, z);
      if (can(u) && !used[u]) {
        Deg[u]--;
        if (Deg[u] == 1) {
          q.push(u);
        }
      }
    }
    for (auto z : go) {
      int u = add(v, z);
      if (can(u) && !used[u]) {
        Deg[u]--;
        if (Deg[u] == 1) {
          q.push(u);
        }
      }
    }
  }
  for (int i = 0; i < N * M; ++i) {
    if (!used[i]) {
      cout << "Not unique" << endl;
      return 0;
    }
  }
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < M; ++j) {
      printf("%c", ans[i][j]);
    }
    printf("\n");
  }
}
