For problem statement at 0-999/300-399/350-359/358/problemC.txt this is a correct solution, but verifier at 0-999/300-399/350-359/358/verifierC.go ends with All 100 tests passed can you fix the verifier? ```go
package main
import (
"bufio"
"os"
"sort"
"strconv"
)
var scanner *bufio.Scanner
var writer *bufio.Writer
func init() {
scanner = bufio.NewScanner(os.Stdin)
scanner.Split(bufio.ScanWords)
writer = bufio.NewWriter(os.Stdout)
}
func scanInt() int {
scanner.Scan()
val, _ := strconv.Atoi(scanner.Text())
return val
}
type Item struct {
val int
origIdx int
}
func main() {
defer writer.Flush()
if !scanner.Scan() {
return
}
n, _ := strconv.Atoi(scanner.Text())
buffer := make([]Item, 0, n)
idxBuffer := make([]int, 0, n)
currentBlockSize := 0
for k := 0; k < n; k++ {
a := scanInt()
if a > 0 {
buffer = append(buffer, Item{val: a, origIdx: currentBlockSize})
currentBlockSize++
} else {
if currentBlockSize == 0 {
writer.WriteString("0\n")
} else {
// Prepare index buffer
idxBuffer = idxBuffer[:currentBlockSize]
for i := 0; i < currentBlockSize; i++ {
idxBuffer[i] = i
}
// Sort indices by value descending
sort.Slice(idxBuffer, func(i, j int) bool {
return buffer[idxBuffer[i]].val > buffer[idxBuffer[j]].val
})
pick := 3
if currentBlockSize < 3 {
pick = currentBlockSize
}
// Get the top 'pick' indices and sort them by arrival time (original index)
finalPicked := make([]int, pick)
copy(finalPicked, idxBuffer[:pick])
sort.Ints(finalPicked)
p1, p2, p3 := -1, -1, -1
if pick >= 1 {
p1 = finalPicked[0]
}
if pick >= 2 {
p2 = finalPicked[1]
}
if pick >= 3 {
p3 = finalPicked[2]
}
for i := 0; i < currentBlockSize; i++ {
if i == p1 {
writer.WriteString("pushQueue\n")
} else if i == p2 {
if pick == 2 {
writer.WriteString("pushStack\n")
} else {
writer.WriteString("pushFront\n")
}
} else if i == p3 {
writer.WriteString("pushStack\n")
} else {
// Garbage placement logic
pivot := -1
if pick == 1 {
pivot = p1
} else {
pivot = p2
}
if i < pivot {
writer.WriteString("pushStack\n")
} else {
writer.WriteString("pushQueue\n")
}
}
}
if pick == 1 {
writer.WriteString("1 popQueue\n")
} else if pick == 2 {
writer.WriteString("2 popQueue popStack\n")
} else {
writer.WriteString("3 popQueue popFront popStack\n")
}
}
// Clear buffer for next block
buffer = buffer[:0]
currentBlockSize = 0
}
}
// Handle trailing additions if any (though problem structure implies ending with extract usually, or just print pushes)
for i := 0; i < currentBlockSize; i++ {
writer.WriteString("pushStack\n")
}
}
```