or download this
map{push@L,@C+0;push@C,lc=~/./g}<>;sub p{$_=pop@n}sub w{push@n,@_}whil
+e($n<@C){$_=$C[$n++];if(/h/){p;w$n[-1-abs];$_>0&&splice@n,-2-$_,1}if(
+/n/){w 0;$b<0||w$b+7*p while($b=index"htaoinse",$C[$n++])<7}$0=p,p,w
+int$_/$0,$_%$0if/e/;if(/t/){$a=p;$a?$n=$L[$a-1]:last if p}/a/?w 1+gre
+p$n>$_,@L:/o/?print chr p:/s/?w-(p)+p:/i/&&w+($_=getc)?ord:-1}