#include <bits/stdc++.h>
inline int getInt() {
  int s;
  scanf("%d", &s);
  return s;
}
using namespace std;
char g[2048][2048];
int cnt[2048][2048];
const int _dx[] = {0, 1, 0, -1};
const int _dy[] = {-1, 0, 1, 0};
const char *self = "v<^>";
const char *opp = "^>v<";
int main() {
  const int h = getInt();
  const int w = getInt();
  for (int i = 0; i < (int)(h); i++) scanf("%s", g[i]);
  for (int i = 0; i < (int)(h); i++)
    for (int j = 0; j < (int)(w); j++)
      if (g[i][j] == '.') {
        for (int k = 0; k < (int)(4); k++) {
          const int x = j + _dx[k];
          const int y = i + _dy[k];
          if (((((x)) >= (0) && ((x)) < ((w))) &&
               (((y)) >= (0) && ((y)) < ((h)))) &&
              g[y][x] == '.')
            cnt[i][j]++;
        }
      }
  queue<pair<int, int> > q;
  for (int i = 0; i < (int)(h); i++)
    for (int j = 0; j < (int)(w); j++)
      if (g[i][j] == '.' && cnt[i][j] == 1) {
        q.push(make_pair(i, j));
      }
  while (q.size()) {
    const pair<int, int> d = q.front();
    q.pop();
    const int x = d.second;
    const int y = d.first;
    if (cnt[y][x] == 1 && g[y][x] == '.') {
      for (int k = 0; k < (int)(4); k++) {
        const int xx = x + _dx[k];
        const int yy = y + _dy[k];
        if (((((xx)) >= (0) && ((xx)) < ((w))) &&
             (((yy)) >= (0) && ((yy)) < ((h)))) &&
            g[yy][xx] == '.') {
          g[y][x] = self[k];
          g[yy][xx] = opp[k];
          for (int i = 0; i < (int)(4); i++) {
            const int xxx = xx + _dx[i];
            const int yyy = yy + _dy[i];
            if (((((xxx)) >= (0) && ((xxx)) < ((w))) &&
                 (((yyy)) >= (0) && ((yyy)) < ((h)))) &&
                g[yyy][xxx] == '.') {
              cnt[yyy][xxx]--;
              if (cnt[yyy][xxx] == 1) q.push(make_pair(yyy, xxx));
            }
          }
          break;
        }
      }
    }
  }
  bool ok = true;
  for (int i = 0; i < (int)(h); i++)
    for (int j = 0; j < (int)(w); j++)
      if (g[i][j] == '.') ok = false;
  if (ok) {
    for (int i = 0; i < (int)(h); i++) puts(g[i]);
  } else {
    puts("Not unique");
  }
  return 0;
}
