#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int maxn = 2010;
int n, m;
char g[maxn][maxn];
bool mustput(int i, int j) {
  int cnt = 0;
  if (g[i][j] != '.') return false;
  for (int x : {-1, 0, 1})
    for (int y : {-1, 0, 1})
      if (abs(x) + abs(y) == 1) cnt += g[i + x][j + y] != '.';
  return cnt == 3;
}
void draw(int a, int b, int c, int d) {
  if (a + 1 == c) g[a][b] = '^', g[a + 1][b] = 'v';
  if (a - 1 == c) g[a - 1][b] = '^', g[a][b] = 'v';
  if (b + 1 == d) g[a][b] = '<', g[a][b + 1] = '>';
  if (b - 1 == d) g[a][b] = '>', g[a][b - 1] = '<';
}
void fill_it(int i, int j) {
  for (int x : {-1, 0, 1})
    for (int y : {-1, 0, 1})
      if (abs(x) + abs(y) == 1 && g[i + x][j + y] == '.') {
        draw(i, j, i + x, j + y);
        for (int xx : {-1, 0, 1})
          for (int yy : {-1, 0, 1})
            if (abs(xx) + abs(yy) == 1 && mustput(i + x + xx, j + y + yy))
              fill_it(i + x + xx, j + y + yy);
      }
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> g[i] + 1;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j)
      if (mustput(i, j)) fill_it(i, j);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j)
      if (g[i][j] == '.') return cout << "Not unique\n", 0;
  for (int i = 1; i <= n; ++i) cout << g[i] + 1 << '\n';
}
