CF69E Subsegments
Description
Programmer Sasha has recently begun to study data structures. His coach Stas told him to solve the problem of finding a minimum on the segment of the array in , which Sasha coped with. For Sasha not to think that he had learned all, Stas gave him a new task. For each segment of the fixed length Sasha must find the maximum element of those that occur on the given segment exactly once. Help Sasha solve this problem.
Input Format
The first line contains two positive integers $ n $ and $ k $ ( $ 1
Output Format
Print $ n–k+1 $ numbers, one per line: on the $ i $ -th line print of the maximum number of those numbers from the subarray $ a_{i} $ $ a_{i+1} $ … $ a_{i+k-1} $ that occur in this subarray exactly 1 time. If there are no such numbers in this subarray, print "Nothing".