#include <bits/stdc++.h>
using namespace std;
struct READ {
  int d1, d2, d3;
  READ(int d1 = -1, int d2 = -1, int d3 = -1) : d1(d1), d2(d2), d3(d3) {}
  template <class T>
  operator T() {
    T tmp;
    this->read(tmp);
    return tmp;
  }
  template <class T>
  void read(T& t) {
    cin >> t;
  }
  template <class T>
  void read(vector<T>& cont) {
    assert(d1 != -1);
    cont.resize(d1);
    READ r(d2, d3);
    for (int i = 0; i < d1; ++i) r.read(cont[i]);
  }
  template <class T1, class T2>
  void read(pair<T1, T2>& x) {
    read(x.first);
    read(x.second);
  }
};
int main(int argc, char* argv[]) {
  int n = READ(), m = READ();
  vector<string> matrix = READ(n);
  vector<pair<int, int>> dishes;
  for (int i = 0; i < n; ++i) dishes.emplace_back(0, i);
  for (int i = 0; i < m; ++i) dishes.emplace_back(1, i);
  auto d1Greatness = [&](int i) {
    int result = 0;
    for (char ch : matrix[i])
      if (ch == '>')
        result += 1;
      else if (ch == '<')
        result -= 1;
    return result;
  };
  auto d2Greatness = [&](int i) {
    int result = 0;
    for (auto& row : matrix)
      if (row[i] == '<')
        result += 1;
      else if (row[i] == '>')
        result -= 1;
    return result;
  };
  auto compare = [&](pair<int, int>& x, pair<int, int>& y) {
    if (x.first == 0) {
      if (y.first == 0) {
        return d1Greatness(x.second) < d1Greatness(y.second);
      } else {
        return matrix[x.second][y.second] == '<';
      }
    } else {
      if (y.first == 0) {
        return matrix[y.second][x.second] == '>';
      } else {
        return d2Greatness(x.second) < d2Greatness(y.second);
      }
    }
  };
  std::sort(dishes.begin(), dishes.end(), compare);
  vector<int> d1(n), d2(m);
  int cur = 1;
  for (int i = 0; i < dishes.size(); ++i) {
    if (i > 0 && compare(dishes[i - 1], dishes[i])) cur += 1;
    if (dishes[i].first == 0)
      d1[dishes[i].second] = cur;
    else
      d2[dishes[i].second] = cur;
  }
  bool goodSolution = true;
  for (int i = 0; i < d1.size(); ++i) {
    for (int j = 0; j < d2.size(); ++j) {
      char ch = '=';
      if (d1[i] > d2[j])
        ch = '>';
      else if (d1[i] < d2[j])
        ch = '<';
      if (ch != matrix[i][j]) {
        goodSolution = false;
        break;
      }
    }
  }
  if (goodSolution) {
    cout << "Yes" << endl;
    for (int x : d1) cout << x << " ";
    cout << endl;
    for (int x : d2) cout << x << " ";
    cout << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
