valid stack pop sequence