#include <bits/stdc++.h>
using namespace std;
int cnt[1005][3];
bool comp(int i, int j) {
  if (cnt[i][2] != cnt[j][2]) return cnt[i][2] < cnt[j][2];
  if (cnt[i][1] != cnt[j][1])
    return cnt[i][1] < cnt[j][1];
  else
    return cnt[i][0] < cnt[j][0];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  string a[n];
  vector<int> b(n);
  for (int i = 0; i < n; i++) b[i] = i;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '<')
        cnt[i][0]++;
      else if (a[i][j] == '>')
        cnt[i][2]++;
      else
        cnt[i][1]++;
    }
  }
  sort(b.begin(), b.end(), comp);
  for (int j = 0; j < m; j++) {
    for (int idx = 1; idx <= n - 1; idx++) {
      char ch = a[b[idx]][j], chp = a[b[idx - 1]][j];
      if (chp == '=' && ch == '<') {
        cout << "No" << endl;
        return 0;
      } else if (chp == '>' && (ch == '<' || ch == '=')) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  vector<int> resa(n), resb(m);
  for (int j = 0; j < m; j++) {
    int i = b[0];
    if (a[i][j] == '>')
      resb[j] = 1;
    else if (a[i][j] == '=') {
      if (cnt[i][2])
        resb[j] = 2;
      else
        resb[j] = 1;
    }
    if (cnt[i][2])
      resa[i] = 2;
    else
      resa[i] = 1;
  }
  for (int idx = 1; idx <= n - 1; idx++) {
    int i = b[idx], j = b[idx - 1];
    if (cnt[i][2] == cnt[j][2] && cnt[i][1] == cnt[j][1]) {
      resa[i] = resa[j];
      continue;
    }
    int mx = resa[j];
    for (int t = 0; t < m; t++) mx = max(resb[t], mx);
    mx = max(mx, resa[j]);
    mx++;
    if (cnt[i][2] < cnt[j][2] + cnt[j][1]) {
      cout << "No" << endl;
      return 0;
    }
    bool yes = false;
    for (int t = 0; t < m; t++) {
      if (a[i][t] == '>' && !resb[t]) {
        yes = true;
        resb[t] = mx;
      }
    }
    if (yes) mx++;
    resa[i] = mx;
    for (int t = 0; t < m; t++)
      if (a[i][t] == '=') resb[t] = mx;
  }
  int mx = resa[b[n - 1]];
  mx++;
  for (int j = 0; j < m; j++)
    if (resb[j] == 0) resb[j] = mx;
  cout << "YES" << endl;
  for (auto it = resa.begin(); it != resa.end(); it++) cout << *it << ' ';
  cout << endl;
  ;
  for (auto it = resb.begin(); it != resb.end(); it++) cout << *it << ' ';
  cout << endl;
  ;
}
