#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
using namespace std;
vector<vector<int> > g;
vector<vector<int> > g1;
vector<set<int> > gcol;
vector<int> col;
int nw = 0;
void dfs(int v) {
  col[v] = nw;
  for (auto t : g[v])
    if (col[t] == -1) dfs(t);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  col.resize(n + m, -1);
  g.resize(n + m, vector<int>());
  g1.resize(n + m, vector<int>());
  char q[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> q[i][j];
      if (q[i][j] == '>')
        g1[i].push_back(n + j);
      else if (q[i][j] == '<')
        g1[n + j].push_back(i);
      else {
        g[i].push_back(n + j);
        g[n + j].push_back(i);
      }
    }
  }
  for (int i = 0; i < n + m; i++) {
    if (col[i] == -1) {
      dfs(i);
      nw++;
    }
  }
  gcol.resize(nw, set<int>());
  for (int i = 0; i < n + m; i++) {
    for (auto t : g1[i]) gcol[col[i]].insert(col[t]);
  }
  vector<int> ans(nw, 0);
  vector<int> us(nw, 0);
  int ost = nw;
  for (int i = 1; ost > 0; i++) {
    vector<int> del;
    for (int j = 0; j < nw; j++) {
      if (!us[j] && gcol[j].size() == 0) {
        ans[j] = i;
        us[j] = 1;
        del.push_back(j);
        ost--;
      }
    }
    if (del.size() == 0) break;
    for (auto t : del) {
      for (int j = 0; j < nw; j++) gcol[j].erase(t);
    }
  }
  if (ost > 0) {
    cout << "No\n";
  } else {
    for (int i = 0; i < n + m; i++) {
      col[i] = ans[col[i]];
    }
    bool ok = true;
    if (!ok)
      cout << "No";
    else {
      cout << "Yes\n";
      for (int i = 0; i < n; i++) cout << col[i] << " ";
      cout << "\n";
      for (int i = n; i < n + m; i++) cout << col[i] << " ";
    }
  }
}
