package main

import "fmt"

func same_to_next(lst []int) []int {
	_lst := []int{}
	for i := 0; i+1 < len(lst); i++ {
		if lst[i] == lst[i+1] {
			_lst = append(_lst, lst[i])
		}
	}
	return _lst
}

func main() {
	check := []int{1, 2, 2, 2, 3, 3, 4}
	fmt.Println(same_to_next(check)) // [2 2 3]

	check = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
	fmt.Println(same_to_next(check)) // []
}