#include<iostream>
#include<string>
using namespace std;
#include<stack>
int main(){
stack<int> sta;
string mys[250000];
int n,i,j;
int a[100010];
while(cin>>n){
for(i=1;i<=n;i++)
cin>>a[i];
a[0]=0;
int kk=1;
int ttt=0;
for(i=1;i<=n;i++)
{
if(!sta.empty()&&sta.top()>a[i]){ttt=1;cout<<"no"<<endl;break;}
if(a[i-1]+1<=a[i]){
for(j=a[i-1]+1;j<=a[i];j++)
{
mys[kk++]="in";
sta.push(j);
}
sta.pop();
mys[kk++]="out";}
else if(sta.top()==a[i]){
mys[kk++]="out";
sta.pop();
}
}
if(ttt==0){
cout<<"yes"<<endl;
for(i=1;i<=2*n;i++)
cout<<mys[i]<<endl;
}
}
}
/*
10
6 8 9 10 7 5 4 3 2 1
3
3 1 2
*/版权声明:本文为博主原创文章,未经博主允许不得转载。
today lazy . tomorrow die .
浙公网安备 33010602011771号