#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {-1, 0, 0, 1}, dy[4] = {0, -1, 1, 0};
const char s1[4] = {'v', '>', '<', '^'}, s2[4] = {'^', '<', '>', 'v'};
int n, m, first, second, tx, ty, d[2010][2010];
char a[2010][2010];
bool flag;
queue<pair<int, int> > q;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    getchar();
    for (int j = 1; j <= m; j++) a[i][j] = getchar();
  }
  for (int i = 1; i <= n; i++) a[i][0] = a[i][m + 1] = '*';
  for (int i = 1; i <= m; i++) a[0][i] = a[n + 1][i] = '*';
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (a[i][j] == '.')
        for (int k = 0; k < 4; k++)
          if (a[i + dx[k]][j + dy[k]] == '.') d[i + dx[k]][j + dy[k]]++;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (d[i][j] == 1) q.push(make_pair(i, j));
  while (!q.empty()) {
    first = q.front().first;
    second = q.front().second;
    q.pop();
    for (int i = 0; i < 4; i++)
      if (a[first + dx[i]][second + dy[i]] == '.') {
        tx = first + dx[i];
        ty = second + dy[i];
        a[first][second] = s1[i];
        a[tx][ty] = s2[i];
        for (int j = 0; j < 4; j++)
          if (a[tx + dx[j]][ty + dy[j]] == '.' &&
              (--d[tx + dx[j]][ty + dy[j]]) == 1)
            q.push(make_pair(tx + dx[j], ty + dy[j]));
      }
  }
  flag = true;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (a[i][j] == '.') flag = false;
  if (flag)
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) putchar(a[i][j]);
      puts("");
    }
  else
    puts("Not unique");
  return 0;
}
