/* All this dirty code written by avm.
*/
import java.util.*;
import java.io.*;
public class abc_am
  {
  static final String filename = "abc";
  static BufferedReader in;
  static PrintStream out;
  static class Child implements Comparable<Child>
    {
    char letter;
    int id;
    Child(char l,int i) {letter = l;id = i;}
    public int compareTo(Child a)
      {
      if (letter < a.letter) return -1;
      if (letter > a.letter) return  1;
      return 0;
      }
    }
  static void test() throws IOException
    {
    int i;
    String s = in.readLine();
    assert(s.length() == 26);
    assert(s.equals(s.toUpperCase()));
    Child a[] = new Child[26];
    for(i=0;i<26;i++) a[i] = new Child(s.charAt(i),i+1);
    Arrays.sort(a);
    for(i=0;i<26;i++)
      {
      if (a[i].letter < 'A' + i) {out.println("NO");return;}
      }
    out.println("YES");
    for(i=0;i<26;i++)
      {
      if (i > 0) out.print(" ");
      out.print(a[i].id);
      }
    out.println();
    }
  public static void main (String[] argv) throws IOException
    {
    in = new BufferedReader(new InputStreamReader(new FileInputStream(filename+ ".in")));
    out = new PrintStream(new BufferedOutputStream(new FileOutputStream(filename + ".out"))); 
    test();
    in.close();
    out.close();
    }
  }

