← Home
```go
package main

import (
	"bufio"
	"container/heap"
	"fmt"
	"os"
)

type IntHeap []int

func (h IntHeap) Len() int { return len(h) }
func (h IntHeap) Less(i, j int) bool { return h[i] > h[j] }
func (h IntHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] }

func (h *IntHeap) Push(x interface{}) {
	*h = append(*h, x.(int))
}

func (h *IntHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

func main() {
	r := bufio.NewReader(os.Stdin)
	var n, k int
	fmt.Fscan(r, &n, &k)
	a := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Fscan(r, &a[i])
	}
	
	freq := make(map[int]int)
	h := &IntHeap{}
	heap.Init(h)
	left := 0
	
	for right := 0; right < n; right++ {
		val := a[right]
		freq[val]++
		if freq[val] == 1 {
			heap.Push(h, val)
		}
		
		if right-left+1 > k {
			leftVal := a[left]
			freq[leftVal]--
			if freq[leftVal] == 1 {
				heap.Push(h, leftVal)
			}
			if freq[leftVal] == 0 {
				delete(freq, leftVal)
			}
			left++
		}
		
		if right >= k-1 {
			for h.Len() > 0 && freq[(*h)[0]] != 1 {
				heap.Pop(h)
			}
			if h.Len() == 0 {
				fmt.Println("Nothing")
			} else {
				fmt.Println((*h)[0])
			}
		}
	}
}
```