#include <bits/stdc++.h>
using namespace std;
char mm[10005][10005];
vector<int> vc[10005];
int in[10005];
int vis[10005];
int reword[10005 << 2];
int n, m;
int f[10005];
void init() {
  for (int i = 0; i < 10005; i++)
    f[i] = i, vc[i].clear(), in[i] = reword[i] = 0;
}
int get(int x) { return x == f[x] ? x : f[x] = get(f[x]); }
void unite(int u, int v) { f[get(u)] = get(v); }
void topo() {
  queue<int> que;
  for (int i = 1; i <= n + m; i++)
    if (in[i] == 0) que.push(i), vis[i] = 1, reword[i] = 1;
  int num = 0;
  while (que.size()) {
    num++;
    int u = que.front();
    in[u]--;
    que.pop();
    for (int i = 0; i < vc[u].size(); i++) {
      int v = vc[u][i];
      in[v]--;
      if (in[v] == 0) que.push(v), vis[v] = 1, reword[v] = reword[u] + 1;
    }
  }
  if (num != n + m)
    printf("No\n");
  else {
    printf("Yes\n");
    for (int i = 1; i <= n; i++) printf("%d ", reword[get(i)]);
    printf("\n");
    for (int i = n + 1; i <= n + m; i++) printf("%d ", reword[get(i)]);
    printf("\n");
  }
}
int main() {
  init();
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", mm[i] + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (mm[i][j] == '=') {
        unite(i, j + n);
      }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (mm[i][j] == '<')
        vc[get(i)].push_back(get(j + n)), in[get(j + n)]++;
      else if (mm[i][j] == '>')
        vc[get(j + n)].push_back(get(i)), in[get(i)]++;
    }
  }
  topo();
  return 0;
}
