package main import "fmt" type ListNode struct { Val int Next *ListNode } func main() { var n int fmt.Scan(&n) var opt string var idx, val int hair := &ListNode{Next: nil} for i := 0; i < n; i++ { fmt.Scan(&opt) if opt == "insert" { fmt.Scan(&idx, &val) n...