#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int MAX = 150005;
map<int, int> mpx;
int main() {
  vector<int> v;
  int a, b;
  scanf("%d %d", &a, &b);
  for (int i = 0; i < a; i++) {
    int k;
    scanf("%d", &k);
    v.push_back(k);
  }
  int ptr = b;
  set<int> second;
  for (int i = 0; i < b; i++) {
    mpx[v[i]]++;
    if (mpx[v[i]] == 2) {
      second.erase(v[i]);
    } else if (mpx[v[i]] == 1) {
      second.insert(v[i]);
    }
  }
  if (second.empty()) {
    printf("%s\n", "Nothing");
  } else {
    printf("%d\n", *second.rbegin());
  }
  while (ptr < a) {
    mpx[v[ptr]]++;
    if (mpx[v[ptr]] == 2) {
      second.erase(v[ptr]);
    } else if (mpx[v[ptr]] == 1) {
      second.insert(v[ptr]);
    }
    mpx[v[ptr - b]]--;
    if (mpx[v[ptr - b]] == 0) {
      second.erase(v[ptr - b]);
    } else if (mpx[v[ptr - b]] == 1) {
      second.insert(v[ptr - b]);
    }
    ptr++;
    if (second.empty()) {
      printf("%s\n", "Nothing");
      continue;
    }
    printf("%d\n", *second.rbegin());
  }
}
