#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 4;
set<int> ts[N];
map<int, int> tmp;
int n, k, a[N];
void add(int v) {
  auto it1 = tmp.find(v);
  if (it1 == tmp.end()) {
    tmp.emplace(v, 1);
    ts[1].insert(v);
  } else {
    ts[it1->second].erase(v);
    it1->second++;
    ts[it1->second].insert(v);
  }
}
void del(int v) {
  auto it1 = tmp.find(v);
  if (it1->second == 1) {
    ts[1].erase(v);
    tmp.erase(it1);
  } else {
    ts[it1->second].erase(v);
    it1->second--;
    ts[it1->second].insert(v);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  for (int i = 1; i <= n; i++) {
    add(a[i]);
    if (i > k) del(a[i - k]);
    if (i >= k) {
      if (ts[1].empty())
        puts("Nothing");
      else
        printf("%d\n", *(ts[1].rbegin()));
    }
  }
}
