there epidemic Monstropolis monster sick to recover monster line queue appointment doctor citysoon monster hungry begin eat one monster eat monster weight strictly great weight monster eat stand queue monster eat instantly there monster eat moment after monster a eat monster b weight monster a increase weight eat monster b in result eat length queue decrease monster eat step forward place queue a monster eat monster initially n monster queue ith weight aiFor example weight 122212 order queue monster number 1 6 leave right option monster can not eat second monster a11 great a22 second monster can not eat monst a22 great a32 second monster can not eat fifth monster neighbor second monster eat monster queue transform 32212 after time say good joke monster recover at moment k kn monster queue jth weight bj both sequences b contain weight monster order lastYou require provide possible order eat monster lead current queue determine happen assume doctor do not appointment monster eat