← Home
For problem statement at 1000-1999/1100-1199/1170-1179/1178/problemE.txt this is a correct solution, but verifier at 1000-1999/1100-1199/1170-1179/1178/verifierE.go ends with case 1 failed: expected bbbabcbbcbabbb got IMPOSSIBLE can you fix the verifier? ```go
package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	in := bufio.NewReaderSize(os.Stdin, 1<<20)
	var s string
	fmt.Fscan(in, &s)
	n := len(s)
	if n == 0 {
		fmt.Print("IMPOSSIBLE")
		return
	}
	need := n / 2
	cnt := [3]int{}
	for i := 0; i < n; i++ {
		cnt[s[i]-'a']++
	}
	best := 0
	for i := 1; i < 3; i++ {
		if cnt[i] > cnt[best] {
			best = i
		}
	}
	if cnt[best] < need {
		fmt.Print("IMPOSSIBLE")
		return
	}
	b := make([]byte, 0, need)
	ch := byte('a' + best)
	for i := 0; i < n && len(b) < need; i++ {
		if s[i] == ch {
			b = append(b, ch)
		}
	}
	fmt.Print(string(b))
}
```