#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<vector<int>> g, gr, mat;
void add_edge(int u, int v) {
  g[u].push_back(v);
  gr[v].push_back(u);
  mat[u][v] = 1;
}
vector<bool> used;
vector<int> order, component;
vector<vector<int>> components;
void dfs1(int v) {
  used[v] = true;
  for (auto u : g[v])
    if (!used[u]) dfs1(u);
  order.push_back(v);
}
void dfs2(int v) {
  used[v] = true;
  component.push_back(v);
  for (auto u : gr[v])
    if (!used[u]) dfs2(u);
}
bool check_component() {
  for (auto v : component)
    if (v < n) {
      for (auto u : component) {
        if (u < n) continue;
        if (mat[v][u] && mat[u][v])
          continue;
        else
          return false;
      }
    }
  return true;
}
int type(vector<int>& v) {
  bool b1 = true, b2 = true;
  for (auto e : v)
    if (e >= n) b1 = false;
  for (auto e : v)
    if (e < n) b2 = false;
  if (b1) return 1;
  if (b2) return 2;
  return 0;
}
int main() {
  cin >> n >> m;
  g.resize(n + m);
  gr.resize(n + m);
  mat.assign(n + m, vector<int>(n + m, 0));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      char c;
      cin >> c;
      if (c == '>') add_edge(i, n + j);
      if (c == '<') add_edge(n + j, i);
      if (c == '=') {
        add_edge(i, n + j);
        add_edge(n + j, i);
      }
    }
  }
  used.assign(n + m, false);
  for (int i = 0; i < n + m; i++)
    if (!used[i]) dfs1(i);
  used.assign(n + m, false);
  for (int i = 0; i < n + m; i++) {
    int v = order[n + m - 1 - i];
    if (!used[v]) {
      dfs2(v);
      if (!check_component()) {
        cout << "No" << endl;
        exit(0);
      }
      components.push_back(component);
      component.clear();
    }
  }
  reverse(components.begin(), components.end());
  int l = components.size();
  set<int> s;
  for (int i = 0; i < l - 1; i++) {
    auto v1 = components[i], v2 = components[i + 1];
    if ((type(v1) == 1 && type(v2) == 1) || (type(v1) == 2 && type(v2) == 2))
      s.insert(i);
  }
  int counter = 1;
  vector<int> res(n + m);
  for (int i = 0; i < l; i++) {
    for (auto e : components[i]) res[e] = counter;
    if (!s.count(i)) counter += 1;
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n; i++) cout << res[i] << " ";
  cout << endl;
  for (int i = n; i < n + m; i++) cout << res[i] << " ";
  cout << endl;
}
