#include <bits/stdc++.h>
using namespace std;
const int maxn = 1111 * 2;
vector<int> G[maxn];
char mp[maxn][maxn];
int du[maxn], num[maxn];
int cnt = 1;
int fa[maxn];
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
void uni(int x, int y) {
  x = find(x), y = find(y);
  if (x != y) fa[y] = x;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n + m; i++) fa[i] = i;
  for (int i = 0; i < n; i++)
    for (int j = n; j < n + m; j++) {
      cin >> mp[i][j];
      if (mp[i][j] == '=') uni(i, j);
    }
  memset(du, 0, sizeof(du));
  for (int i = 0; i < n; i++)
    for (int j = n; j < n + m; j++)
      if (mp[i][j] == '<')
        G[find(i)].push_back(find(j)), du[find(j)]++;
      else if (mp[i][j] == '>')
        G[find(j)].push_back(find(i)), du[find(i)]++;
  queue<int> q;
  for (int i = 0; i < n + m; i++)
    if (!du[find(i)]) q.push(find(i)), du[find(i)]--, num[find(i)] = 1;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int v : G[u]) {
      v = find(v);
      if (!(--du[v])) q.push(v), du[v]--, num[v] = num[find(u)] + 1;
    }
  }
  int is = 1;
  for (int i = 0; i < n + m; i++)
    if (du[find(i)] > 0) is = 0;
  if (is) {
    cout << "Yes" << endl;
    for (int i = 0; i < n; i++) cout << num[find(i)] << ' ';
    cout << endl;
    for (int i = n; i < m + n; i++) cout << num[find(i)] << ' ';
  } else {
    cout << "No" << endl;
  }
}
