#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>

#define TASKNAME "abc"

const int MaxN = 26, MaxL = 'Z' + 1;

char s [MaxN + 1];
int p [MaxN];

int main (void)
{
 int i, j, k, l, n;
 freopen (TASKNAME ".in", "rt", stdin);
 freopen (TASKNAME ".out", "wt", stdout);
 while (scanf (" %s", s) != EOF)
 {
  n = strlen (s);
  for (i = 0; i < n; i++) p[i] = i;
  for (i = 0; i < n - 1; i++)
   for (j = i + 1; j < n; j++)
    if (s[p[i]] > s[p[j]])
     k = p[i], p[i] = p[j], p[j] = k;
  for (i = 0; i < n; i++)
   if (s[p[i]] < i + 'A') break;
  if (i < n)
  {
   printf ("NO\n");
  }
  else
  {
   printf ("YES\n");
   for (i = 0; i < n; i++)
    printf ("%d%c", p[i] + 1, (i + 1 < n) ? ' ' : '\n');
  }
 }
 return 0;
}
