For problem statement at 0-999/400-499/430-439/430/problemA.txt this is a correct solution, but verifier at 0-999/400-499/430-439/430/verifierA.go ends with All 100 tests passed can you fix the verifier? ```go
package main
import (
"fmt"
"sort"
)
func main() {
var n, m int
fmt.Scan(&n, &m)
x := make([]int, n)
for i := 0; i < n; i++ {
fmt.Scan(&x[i])
}
type segment struct {
l, r int
}
segs := make([]segment, m)
for i := 0; i < m; i++ {
fmt.Scan(&segs[i].l, &segs[i].r)
}
// Create indices sorted by coordinate
indices := make([]int, n)
for i := 0; i < n; i++ {
indices[i] = i
}
sort.Slice(indices, func(a, b int) bool {
return x[indices[a]] < x[indices[b]]
})
// Assign alternating colors in sorted order
color := make([]int, n)
for rank, idx := range indices {
color[idx] = rank % 2
}
// Verify all segments
for i := 0; i < m; i++ {
red := 0
blue := 0
for j := 0; j < n; j++ {
if x[j] >= segs[i].l && x[j] <= segs[i].r {
if color[j] == 0 {
red++
} else {
blue++
}
}
}
if red-blue > 1 || blue-red > 1 {
fmt.Println(-1)
return
}
}
for i := 0; i < n; i++ {
if i > 0 {
fmt.Print(" ")
}
fmt.Print(color[i])
}
fmt.Println()
}
```