#include <bits/stdc++.h>
using namespace std;
int n, m, a[1001], b[1001], sa[1001], sb[1001], s, ok,
    val = 1, ln, lm, Ok, v[1001][1001], eg1[1001], eg2[1001], mn;
char c;
int main() {
  cin >> n >> m;
  ln = m;
  lm = n;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> c;
      switch (c) {
        case '<':
          sa[i]++;
          s++;
          v[i][j] = -1;
          break;
        case '=':
          sa[i]++;
          sb[j]++;
          v[i][j] = 0;
          eg1[i]++;
          eg2[j]++;
          break;
        case '>':
          sb[j]++;
          s++;
          v[i][j] = 1;
          break;
      }
    }
  }
  while (ln > 0 && lm > 0) {
    ok = 0;
    mn = m + 1;
    ;
    for (int i = 1; i <= n; i++)
      if (eg1[i] < mn && sa[i] >= ln) mn = eg1[i];
    for (int i = 1; i <= n; i++) {
      if (sa[i] >= ln && eg1[i] == mn) {
        lm--;
        a[i] = val;
        sa[i] = -1;
        ok = 1;
      }
    }
    Ok = ok;
    mn = n + 1;
    for (int i = 1; i <= m; i++)
      if (eg2[i] < mn && sb[i] >= lm + Ok) mn = eg2[i];
    for (int i = 1; i <= m; i++) {
      if (sb[i] >= lm + Ok && eg2[i] == mn) {
        ln--;
        b[i] = val;
        sb[i] = -1;
        ok = 1;
      }
    }
    if (ok == 0) {
      cout << "NO";
      return 0;
    }
    val++;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0) a[i] = val;
    for (int j = 1; j <= m; j++) {
      if (b[j] == 0) b[j] = val;
      if ((v[i][j] == 0 && a[i] != b[j]) ||
          (v[i][j] && a[i] * v[i][j] <= b[j] * v[i][j])) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES\n";
  for (int i = 1; i <= n; i++) {
    cout << a[i] << ' ';
  }
  cout << '\n';
  for (int i = 1; i <= m; i++) {
    cout << b[i] << ' ';
  }
  return 0;
}
