#include <bits/stdc++.h>
using namespace std;
int x, y;
char s[2005][2005];
int road[2005][2005];
void pu(int i, int j);
void fresh(int i, int j) {
  road[i - 1][j]--;
  road[i + 1][j]--;
  road[i][j - 1]--;
  road[i][j + 1]--;
  pu(i - 1, j);
  pu(i + 1, j);
  pu(i, j - 1);
  pu(i, j + 1);
}
void pu(int i, int j) {
  if (road[i][j] != 1 || s[i][j] != '.') return;
  road[i - 1][j]--;
  road[i + 1][j]--;
  road[i][j - 1]--;
  road[i][j + 1]--;
  if (s[i - 1][j] == '.') {
    s[i - 1][j] = '^';
    s[i][j] = 'v';
    fresh(i - 1, j);
  } else if (s[i + 1][j] == '.') {
    s[i + 1][j] = 'v';
    s[i][j] = '^';
    fresh(i + 1, j);
  } else if (s[i][j - 1] == '.') {
    s[i][j - 1] = '<';
    s[i][j] = '>';
    fresh(i, j - 1);
  } else if (s[i][j + 1] == '.') {
    s[i][j + 1] = '>';
    s[i][j] = '<';
    fresh(i, j + 1);
  }
}
int main() {
  int flag1 = 0, flag2 = 1;
  cin >> x >> y;
  for (int i = 1; i <= x; i++) cin >> s[i];
  for (int i = 1; i <= x; i++)
    for (int j = y; j > 0; j--) s[i][j] = s[i][j - 1];
  for (int i = 1; i <= x; i++) {
    s[i][0] = '*';
  }
  for (int i = 1; i <= y; i++) {
    s[0][i] = '*';
  }
  for (int i = 1; i <= x; i++) {
    for (int j = 1; j <= y; j++)
      if (s[i][j] == '.') {
        if (s[i - 1][j] == '.') road[i][j]++;
        if (s[i + 1][j] == '.') road[i][j]++;
        if (s[i][j - 1] == '.') road[i][j]++;
        if (s[i][j + 1] == '.') road[i][j]++;
      }
  }
  for (int i = 1; i <= x && flag2; i++) {
    for (int j = 1; j <= y; j++)
      if (s[i][j] == '.') {
        flag1 = 1;
        if (road[i][j] > 0) {
          flag2 = 0;
          break;
        }
      }
  }
  if (flag1 && flag2) {
    cout << "Not unique" << endl;
    return 0;
  }
  for (int i = 1; i <= x; i++) {
    for (int j = 1; j <= y; j++) pu(i, j);
  }
  for (int i = 1; i <= x; i++) {
    for (int j = 1; j <= y; j++) {
      if (road[i][j] > 0) {
        cout << "Not unique" << endl;
        return 0;
      }
    }
  }
  for (int i = 1; i <= x; i++) {
    for (int j = 1; j <= y; j++) cout << s[i][j];
    cout << endl;
  }
  return 0;
}
