#include<iostream>
#include<string>
using namespace std;
class stack {
private:
char* strArray;
int size = 0 ;
public:
void push(char ch)
{
char* strTemp = new char[size];
for (int i = 0; i < size; i++)
strTemp[i] = strArray[i];
strArray = new char[size + 1];
for (int i = 0; i < size; i++)
strArray[i] = strTemp[i];
size++;
strArray[size - 1] = ch;
}
void pop()
{
char* strTemp = new char[size - 1];
for (int i = 0; i < size - 1; i++)
strTemp[i] = strArray[i];
strArray = new char[size - 1];
for (int i = 0; i < size - 1; i++)
strArray[i] = strTemp[i];
size--;
}
char peek()
{
if (size == 0)return 0;
else return strArray[size - 1];
}
int Size() { return size; }
};
int main()
{
stack strStack;
string input;
while (cin >> input)
{
string standard;
int canDo = 1;
standard.resize(input.size());
for (int i = 0; i < input.size(); i++)standard[i] = 65 + i;
for (int i = 0; i < input.size(); i++)
{
int showedCount= 0;
if (i < input.size() -1)
{
if ((input[i + 1] - input[i]) < -1)
{
for (int k = 0; k < i; k++)if (input[k] > input[i+1] && input[k] < input[i])showedCount++;
if (showedCount != input[i] - input[i+1] - 1)canDo = 0;
}
}
}
if (!canDo)cout << "NO\n";
else
{
cout << "YES\n";
int Count = 0;
int tempSize = 0;
for (int i = 0; i < input.size(); i++)
{
strStack.push(65 + i);
cout << "push" << strStack.peek() << " ";
tempSize = strStack.Size();
if (strStack.peek() == input[Count])
{
for (int k = 0; k < tempSize; k++)
{
if (strStack.peek() == input[Count] && (Count + k < input.size()))
{
cout << "pop" << strStack.peek() << " ";
strStack.pop();
Count++;
}
}
}
}
tempSize = strStack.Size();
for (int i = 0; i < tempSize; i++)
{
cout << "pop" << strStack.peek() << " ";
strStack.pop();
}
cout << "\n";
}
}
}