#include <bits/stdc++.h>
int n, m;
int dx[] = {0, -1, 0, 1};
int dy[] = {1, 0, -1, 0};
char fs[] = {'<', 'v', '>', '^'};
char ls[] = {'>', '^', '<', 'v'};
char mp[2200][2200];
int dmp[2200][2200];
bool fmp[2200][2200];
int qx[4400000], qy[4400000];
int main() {
  while (scanf("%d%d", &n, &m) > -1) {
    for (int i = 1; i <= n; i++) scanf("%s", mp[i] + 1);
    int num = 0;
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++) {
        if (mp[i][j] == '.') {
          num++;
          for (int k = 0; k < 4; k++) dmp[i + dx[k]][j + dy[k]]++;
        }
      }
    if (num & 2 == 1) {
      puts("Not unique");
      continue;
    }
    bool flg = false;
    int head = 0;
    int tail = 0;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++)
        if (mp[i][j] == '.' && dmp[i][j] == 1) {
          for (int k = 0; k < 4; k++)
            if (mp[i + dx[k]][j + dy[k]] == '.') {
              mp[i + dx[k]][j + dy[k]] = ls[k];
              mp[i][j] = fs[k];
              for (int l = 0; l < 4; l++) {
                dmp[i + dx[k] + dx[l]][j + dy[k] + dy[l]]--;
                if (dmp[i + dx[k] + dx[l]][j + dy[k] + dy[l]] == 0 &&
                    mp[i + dx[k] + dx[l]][j + dy[k] + dy[l]] == '.') {
                  flg = true;
                  break;
                }
                if (dmp[i + dx[k] + dx[l]][j + dy[k] + dy[l]] == 1 &&
                    mp[i + dx[k] + dx[l]][j + dy[k] + dy[l]] == '.') {
                  qx[++tail] = i + dx[k] + dx[l];
                  qy[tail] = j + dy[k] + dy[l];
                }
              }
              if (flg) break;
            }
          if (flg) break;
        }
      if (flg) break;
    }
    if (flg) {
      puts("Not unique");
      continue;
    }
    while (head < tail) {
      int i = qx[++head];
      int j = qy[head];
      if (mp[i][j] == '.' && dmp[i][j] == 1) {
        for (int k = 0; k < 4; k++)
          if (mp[i + dx[k]][j + dy[k]] == '.') {
            mp[i + dx[k]][j + dy[k]] = ls[k];
            mp[i][j] = fs[k];
            for (int l = 0; l < 4; l++) {
              dmp[i + dx[k] + dx[l]][j + dy[k] + dy[l]]--;
              if (dmp[i + dx[k] + dx[l]][j + dy[k] + dy[l]] == 0 &&
                  mp[i + dx[k] + dx[l]][j + dy[k] + dy[l]] == '.') {
                flg = true;
                break;
              }
              if (dmp[i + dx[k] + dx[l]][j + dy[k] + dy[l]] == 1 &&
                  mp[i + dx[k] + dx[l]][j + dy[k] + dy[l]] == '.') {
                qx[++tail] = i + dx[k] + dx[l];
                qy[tail] = j + dy[k] + dy[l];
              }
            }
            if (flg) break;
          }
        if (flg) break;
      }
    }
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++)
        if (mp[i][j] == '.') flg = true;
    if (flg) {
      puts("Not unique");
      continue;
    }
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) printf("%c", mp[i][j]);
      puts("");
    }
  }
  return 0;
}
