```go
package main
import (
"bufio"
"fmt"
"os"
"sort"
"strconv"
"strings"
)
type Boy struct {
id int
skill int
}
func main() {
scanner := bufio.NewScanner(os.Stdin)
scanner.Split(bufio.ScanWords)
scanner.Buffer(make([]byte, 1024*1024), 1024*1024*10)
if !scanner.Scan() {
return
}
n, _ := strconv.Atoi(scanner.Text())
boys := make([]Boy, n)
for i := 0; i < n; i++ {
scanner.Scan()
skill, _ := strconv.Atoi(scanner.Text())
boys[i] = Boy{id: i + 1, skill: skill}
}
sort.Slice(boys, func(i, j int) bool {
return boys[i].skill > boys[j].skill
})
team1 := make([]string, 0, n/2+1)
team2 := make([]string, 0, n/2+1)
for i, b := range boys {
if i%2 == 0 {
team1 = append(team1, strconv.Itoa(b.id))
} else {
team2 = append(team2, strconv.Itoa(b.id))
}
}
out := bufio.NewWriter(os.Stdout)
fmt.Fprintln(out, len(team1))
fmt.Fprintln(out, strings.Join(team1, " "))
fmt.Fprintln(out, len(team2))
fmt.Fprintln(out, strings.Join(team2, " "))
out.Flush()
}
```