#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {-1, 0, 0, 1}, dy[4] = {0, -1, 1, 0};
int n, m, sum, x, y, z, l, r, i, j, k, h, s[2002][2002];
bool flag, vis[2001][2001];
char a[2002][2002];
queue<pair<pair<int, int>, int> > q;
char f1(int x) { return x == 0 ? 'v' : (x == 1 ? '>' : (x == 2 ? '<' : '^')); }
char f2(int x) { return x == 0 ? '^' : (x == 1 ? '<' : (x == 2 ? '>' : 'v')); }
int main() {
  scanf("%d%d", &n, &m);
  getchar();
  for (i = 0; i <= n + 1; i++) a[i][0] = a[i][m + 1] = '*';
  for (i = 0; i <= m + 1; i++) a[0][i] = a[n + 1][i] = '*';
  for (i = 1; i <= n; i++) gets(a[i] + 1);
  flag = true;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (a[i][j] == '.') {
        sum++;
        for (k = 0; k < 4; k++)
          if (a[i + dx[k]][j + dy[k]] == '.') {
            s[i][j]++;
            h = k;
          }
        if (s[i][j] == 0) flag = false;
        if (s[i][j] == 1) q.push(make_pair(make_pair(i, j), h));
      }
  while (!q.empty() && flag) {
    x = q.front().first.first;
    y = q.front().first.second;
    z = q.front().second;
    q.pop();
    if (!vis[x][y]) {
      l = x + dx[z];
      r = y + dy[z];
      a[x][y] = f1(z);
      a[l][r] = f2(z);
      vis[x][y] = vis[l][r] = true;
      sum -= 2;
      for (k = 0; k < 4; k++)
        if (!vis[i = l + dx[k]][j = r + dy[k]]) {
          s[i][j]--;
          if (s[i][j] == 0) flag = false;
          if (s[i][j] == 1)
            for (h = 0; h < 4; h++)
              if (a[i + dx[h]][j + dy[h]] == '.')
                q.push(make_pair(make_pair(i, j), h));
        }
    }
  }
  if (!flag || sum > 0)
    puts("Not unique");
  else
    for (i = 1; i <= n; i++) puts(a[i] + 1);
  return 0;
}
