#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, nr, x, y, t[2120][2120];
char s[2120][2120];
queue<pair<int, int> > que;
int main() {
  scanf("%d%d\n", &n, &m);
  for (i = 1; i <= n; i++) gets(s[i] + 1);
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (s[i][j] == '.') {
        nr = 0;
        if (s[i][j + 1] == '.') nr++;
        if (s[i + 1][j] == '.') nr++;
        if (s[i - 1][j] == '.') nr++;
        if (s[i][j - 1] == '.') nr++;
        if (nr == 1) que.push(make_pair(i, j));
        t[i][j] = nr;
      }
  while (!que.empty()) {
    x = que.front().first;
    y = que.front().second;
    que.pop();
    t[x][y] = 0;
    if (s[x][y + 1] == '.') {
      s[x][y] = '<', s[x][y + 1] = '>';
      t[x][y + 1] = 0;
      t[x][y - 1]--;
      t[x - 1][y]--;
      t[x + 1][y]--;
      t[x - 1][y + 1]--;
      t[x][y + 2]--;
      t[x + 1][y + 1]--;
      if (t[x][y - 1] == 1) que.push(make_pair(x, y - 1));
      if (t[x - 1][y] == 1) que.push(make_pair(x - 1, y));
      if (t[x + 1][y] == 1) que.push(make_pair(x + 1, y));
      if (t[x][y + 2] == 1) que.push(make_pair(x, y + 2));
      if (t[x - 1][y + 1] == 1) que.push(make_pair(x - 1, y + 1));
      if (t[x + 1][y + 1] == 1) que.push(make_pair(x + 1, y + 1));
    } else if (s[x + 1][y] == '.') {
      s[x][y] = '^', s[x + 1][y] = 'v';
      t[x + 1][y] = 0;
      t[x - 1][y]--;
      t[x][y - 1]--;
      t[x][y + 1]--;
      t[x + 1][y + 1]--;
      t[x + 1][y - 1]--;
      t[x + 2][y]--;
      if (t[x - 1][y] == 1) que.push(make_pair(x - 1, y));
      if (t[x][y - 1] == 1) que.push(make_pair(x, y - 1));
      if (t[x][y + 1] == 1) que.push(make_pair(x, y + 1));
      if (t[x + 2][y] == 1) que.push(make_pair(x + 2, y));
      if (t[x + 1][y + 1] == 1) que.push(make_pair(x + 1, y + 1));
      if (t[x + 1][y - 1] == 1) que.push(make_pair(x + 1, y - 1));
    } else if (s[x][y - 1] == '.') {
      s[x][y] = '>', s[x][y - 1] = '<';
      t[x][y - 1] = 0;
      t[x + 1][y]--;
      t[x - 1][y]--;
      t[x][y + 1]--;
      t[x - 1][y - 1]--;
      t[x + 1][y - 1]--;
      t[x][y - 2]--;
      if (t[x + 1][y] == 1) que.push(make_pair(x + 1, y));
      if (t[x - 1][y] == 1) que.push(make_pair(x - 1, y));
      if (t[x][y + 1] == 1) que.push(make_pair(x, y + 1));
      if (t[x][y - 2] == 1) que.push(make_pair(x, y - 2));
      if (t[x - 1][y - 1] == 1) que.push(make_pair(x - 1, y - 1));
      if (t[x + 1][y - 1] == 1) que.push(make_pair(x + 1, y - 1));
    } else if (s[x - 1][y] == '.') {
      s[x][y] = 'v', s[x - 1][y] = '^';
      t[x - 1][y] = 0;
      t[x + 1][y]--;
      t[x][y - 1]--;
      t[x][y + 1]--;
      t[x - 1][y + 1]--;
      t[x - 1][y - 1]--;
      t[x - 2][y]--;
      if (t[x + 1][y] == 1) que.push(make_pair(x + 1, y));
      if (t[x][y - 1] == 1) que.push(make_pair(x, y - 1));
      if (t[x][y + 1] == 1) que.push(make_pair(x, y + 1));
      if (t[x - 2][y] == 1) que.push(make_pair(x - 2, y));
      if (t[x - 1][y - 1] == 1) que.push(make_pair(x - 1, y - 1));
      if (t[x - 1][y + 1] == 1) que.push(make_pair(x - 1, y + 1));
    }
  }
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (s[i][j] == '.') {
        printf("Not unique\n");
        return 0;
      }
  for (i = 1; i <= n; i++) puts(s[i] + 1);
  return 0;
}
