#include <bits/stdc++.h>
using namespace std;
const long long inf = 0x3f3f3f3f;
const int mx = 2000 + 10;
int fa[mx], ma[mx][mx], co[mx], score[mx];
int n, m;
char str[mx];
vector<int> ve[mx];
queue<int> qu;
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n + m; i++) {
    fa[i] = i;
    score[i] = co[i] = 0;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%s", str + 1);
    for (int j = 1; j <= m; j++) {
      if (str[j] == '>')
        ma[i][j + n] = 1;
      else if (str[j] == '<')
        ma[i][j + n] = -1;
      else {
        int a = find(i), b = find(j + n);
        fa[a] = b;
      }
    }
  }
  int a, b;
  bool ok = 1;
  for (int i = 1; i <= n && ok; i++) {
    for (int j = 1 + n; j <= n + m && ok; j++) {
      a = find(i);
      b = find(j);
      if (ma[i][j] == 1) {
        if (a == b) {
          ok = 0;
          break;
        }
        co[a]++;
        ve[b].push_back(a);
      } else if (ma[i][j] == -1) {
        if (a == b) {
          ok = 0;
          break;
        }
        co[b]++;
        ve[a].push_back(b);
      }
    }
  }
  if (ok == 0) {
    puts("No");
    return 0;
  }
  for (int i = 1; i <= n + m; i++) {
    if (i == find(i) && co[i] == 0) {
      score[i] = 1;
      qu.push(i);
    }
  }
  int te;
  while (!qu.empty()) {
    te = qu.front();
    qu.pop();
    for (int i = 0; i < ve[te].size(); i++) {
      int v = ve[te][i];
      co[v]--;
      if (co[v] == 0) {
        score[v] = score[te] + 1;
        qu.push(v);
      }
    }
  }
  for (int i = 1; i <= n + m; i++) {
    if (i == find(i) && score[i] == 0) {
      puts("No");
      return 0;
    }
  }
  puts("Yes");
  for (int i = 1; i <= n; i++) {
    int a = find(i);
    if (i == 1)
      printf("%d", score[a]);
    else
      printf(" %d", score[a]);
  }
  puts("");
  for (int i = 1; i <= m; i++) {
    int a = find(i + n);
    if (i == 1)
      printf("%d", score[a]);
    else
      printf(" %d", score[a]);
  }
  puts("");
  return 0;
}
