#include <bits/stdc++.h>
using namespace std;
bool bin(unsigned long long a, unsigned long long b) { return a > b; }
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  long inp;
  queue<long> seg;
  map<long, long> cnt;
  set<long> once;
  for (int y = 0; y < k; y++) {
    scanf("%ld", &inp);
    seg.push(inp);
    cnt[inp]++;
    if (cnt[inp] == 1)
      once.insert(inp);
    else if (cnt[inp] > 1)
      once.erase(inp);
  }
  if (!once.empty())
    printf("%ld\n", (*once.rbegin()));
  else
    puts("Nothing");
  for (int y = 0; y < n - k; y++) {
    if (cnt[seg.front()] == 1) {
      once.erase(seg.front());
      cnt.erase(seg.front());
    } else
      cnt[seg.front()]--;
    if (cnt[seg.front()] == 1) once.insert(seg.front());
    seg.pop();
    scanf("%ld", &inp);
    seg.push(inp);
    cnt[inp]++;
    if (cnt[inp] == 1)
      once.insert(inp);
    else
      once.erase(inp);
    if (!once.empty())
      printf("%ld\n", (*once.rbegin()));
    else
      puts("Nothing");
  }
}
