#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
inline int read() {
  int x = 0;
  bool op = false;
  char c = getchar();
  while (!isdigit(c)) op |= (c == '-'), c = getchar();
  while (isdigit(c)) x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  return op ? -x : x;
}
const int N = 3010;
const int M = N * N + N;
int n, m, tot;
int head[N * 2], to[M * 2], nxt[M * 2], edge[M * 2], vis[N * 2], dis[N * 2],
    cnt[N * 2];
char s[N];
struct Node {
  int to, w;
  Node() {}
  Node(int to, int w) : to(to), w(w) {}
};
vector<Node> nbr[N];
void addedge(int u, int v, int w) {
  to[++tot] = v;
  edge[tot] = w;
  nxt[tot] = head[u];
  head[u] = tot;
}
bool spfa() {
  queue<int> q;
  vis[0] = 1;
  q.push(0);
  memset(dis, -0x3f, sizeof(dis));
  dis[0] = 0;
  while (q.empty() == false) {
    int u = q.front();
    q.pop();
    vis[u] = 0;
    for (int i = 0, vs = nbr[u].size(); i < vs; i++) {
      int to = nbr[u][i].to, w = nbr[u][i].w;
      if (dis[to] < dis[u] + w) {
        dis[to] = dis[u] + w;
        if (vis[to] == 0) {
          vis[to] = 1, q.push(to);
          cnt[to]++;
          if (cnt[to] > n + m) return false;
        }
      }
    }
  }
  return true;
}
int main() {
  n = read();
  m = read();
  for (int i = 1; i <= n; i++) {
    scanf("%s", s + 1);
    for (int j = 1; j <= m; j++) {
      if (s[j] == '>')
        nbr[j + n].push_back(Node(i, 1));
      else if (s[j] == '<')
        nbr[i].push_back(Node(j + n, 1));
      else
        nbr[i].push_back(Node(j + n, 0)), nbr[j + n].push_back(Node(i, 0));
    }
  }
  for (int i = 1; i <= n + m; i++) nbr[0].push_back(Node(i, 0));
  if (spfa() == 0)
    printf("No");
  else {
    puts("Yes");
    int mini = 1e9;
    for (int i = 1; i <= n + m; i++) mini = min(mini, dis[i]);
    for (int i = 1; i <= n; i++) printf("%d ", dis[i] - mini + 1);
    puts("");
    for (int i = n + 1; i <= n + m; i++) printf("%d ", dis[i] - mini + 1);
  }
  return 0;
}
