#include <bits/stdc++.h>
long long int pow(long long int a, long long int b, long long int m) {
  a %= m;
  long long int x = 1, y = a;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x * y);
      if (x > m) x %= m;
    }
    y = (y * y);
    if (y > m) y %= m;
    b /= 2;
  }
  return x % m;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long int gen(long long int start, long long int end) {
  long long int diff = end - start;
  long long int temp = rand() % start;
  return temp + diff;
}
using namespace std;
char g[2002][2002];
int deg[2002][2002];
queue<pair<int, int> > q;
void update(int i, int j) {
  if (g[i - 1][j] == '.') {
    --deg[i - 1][j];
    if (deg[i - 1][j] == 1) q.push({i - 1, j});
  }
  if (g[i + 1][j] == '.') {
    --deg[i + 1][j];
    if (deg[i + 1][j] == 1) q.push({i + 1, j});
  }
  if (g[i][j - 1] == '.') {
    --deg[i][j - 1];
    if (deg[i][j - 1] == 1) q.push({i, j - 1});
  }
  if (g[i][j + 1] == '.') {
    --deg[i][j + 1];
    if (deg[i][j + 1] == 1) q.push({i, j + 1});
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> g[i][j];
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (g[i][j] == '.') {
        if (g[i - 1][j] == '.') {
          ++deg[i][j];
        }
        if (g[i + 1][j] == '.') {
          ++deg[i][j];
        }
        if (g[i][j - 1] == '.') {
          ++deg[i][j];
        }
        if (g[i][j + 1] == '.') {
          ++deg[i][j];
        }
        if (deg[i][j] == 1) {
          q.push({i, j});
        }
      }
    }
  }
  while (q.size()) {
    int x = q.front().first;
    int y = q.front().second;
    q.pop();
    if (deg[x][y] == 1) {
      if (g[x - 1][y] == '.') {
        deg[x][y] = 0;
        deg[x - 1][y]--;
        g[x][y] = 'v';
        g[x - 1][y] = '^';
        update(x - 1, y);
      } else if (g[x + 1][y] == '.') {
        deg[x][y] = 0;
        deg[x + 1][y]--;
        g[x][y] = '^';
        g[x + 1][y] = 'v';
        update(x + 1, y);
      } else if (g[x][y - 1] == '.') {
        deg[x][y] = 0;
        deg[x][y - 1]--;
        g[x][y] = '>';
        g[x][y - 1] = '<';
        update(x, y - 1);
      } else if (g[x][y + 1] == '.') {
        deg[x][y] = 0;
        deg[x][y + 1]--;
        g[x][y + 1] = '>';
        g[x][y] = '<';
        update(x, y + 1);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (g[i][j] == '.') {
        cout << "Not unique";
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cout << g[i][j];
    }
    cout << "\n";
  }
}
