#include <bits/stdc++.h>
int n, k;
std::set<int> single;
std::map<int, int> occurs;
std::vector<int> values;
int getMaxValSet(std::set<int> &s) {
  std::set<int>::iterator it = s.end();
  if (it != s.begin())
    it--;
  else
    return 2000000000;
  return *it;
}
int main() {
  int val;
  scanf("%d %d\n", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &val);
    values.push_back(val);
  }
  for (int i = 0; i < k; i++) ++occurs[values[i]];
  for (std::map<int, int>::iterator it = occurs.begin(); it != occurs.end();
       it++)
    if ((*it).second == 1) single.insert((*it).first);
  if ((val = getMaxValSet(single)) != 2000000000)
    printf("%d\n", val);
  else
    printf("Nothing\n");
  for (int i = 0; i < n - k; i++) {
    if (values.at(i) != values.at(i + k)) {
      if (occurs[values.at(i)] == 2) {
        occurs[values.at(i)] = 1;
        single.insert(values.at(i));
      } else if (occurs[values.at(i)] == 1) {
        occurs.erase(values.at(i));
        single.erase(values.at(i));
      } else
        --occurs[values.at(i)];
      if (occurs[values.at(i + k)] == 0) {
        occurs[values.at(i + k)] = 1;
        single.insert(values.at(i + k));
      } else if (occurs[values.at(i + k)] == 1) {
        occurs[values.at(i + k)] = 2;
        single.erase(values.at(i + k));
      } else
        ++occurs[values.at(i + k)];
    }
    if ((val = getMaxValSet(single)) != 2000000000)
      printf("%d\n", val);
    else
      printf("Nothing\n");
  }
  return 0;
}
