#include <bits/stdc++.h>
using namespace std;
int n, m, tot, totcol, cnt[100005], val[100005], vis[100005];
int col[5555], head[2000005], nxt[2000005], point[2000005];
int a[2005][2005], con[2005][2005];
vector<int> v[100005];
set<pair<int, int> > all;
char s[1005][1005];
void gotohell() {
  puts("No");
  exit(0);
}
void addedge(int x, int y) {
  point[++tot] = y, nxt[tot] = head[x], head[x] = tot;
  point[++tot] = x, nxt[tot] = head[y], head[y] = tot;
}
void addedge2(int x, int y) { v[x].push_back(y); }
void dfs(int x, int c) {
  col[x] = c;
  vis[x] = 1;
  for (int i = head[x]; i; i = nxt[i]) {
    int y = point[i];
    if (!vis[y]) dfs(y, c);
  }
}
void dfs2(int x) {
  vis[x] = 1;
  val[x] = 1;
  for (int i = 0; i < v[x].size(); i++) {
    int y = v[x][i];
    if (!vis[y])
      dfs2(y);
    else if (vis[y] == 1)
      gotohell();
    val[x] = max(val[x], val[y] + 1);
  }
  vis[x] = 2;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '>')
        a[i][j] = 1;
      else if (s[i][j] == '<')
        a[i][j] = -1;
      else
        addedge(i, j + n);
    }
  }
  for (int i = 1; i <= n + m; i++)
    if (!vis[i]) dfs(i, ++totcol);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == 1) {
        if (col[i] == col[j + n]) gotohell();
        con[col[i]][col[j + n]] = 1;
      } else if (a[i][j] == -1) {
        if (col[i] == col[j + n]) gotohell();
        con[col[j + n]][col[i]] = 1;
      }
    }
  }
  for (int i = 1; i <= totcol; i++) {
    for (int j = 1; j <= totcol; j++) {
      if (con[i][j]) {
        addedge2(i, j);
      }
    }
  }
  for (int i = 1; i <= totcol; i++) vis[i] = 0;
  for (int i = 1; i <= totcol; i++)
    if (!vis[i]) dfs2(i);
  puts("Yes");
  for (int i = 1; i <= n; i++) printf("%d ", val[col[i]]);
  puts("");
  for (int i = n + 1; i <= n + m; i++) printf("%d ", val[col[i]]);
  return 0;
}
