#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
int n, k;
int a[MAXN];
map<int, int> cnt;
set<int> single;
int main() {
  scanf("%d%d", &n, &k);
  for (int ii = 0; ii < n; ii++) scanf("%d", &a[ii]);
  for (int ii = 0; ii < n; ii++) {
    if (ii < k) {
      cnt[a[ii]]++;
      if (cnt[a[ii]] == 1)
        single.insert(a[ii]);
      else
        single.erase(a[ii]);
      if (ii == k - 1) {
        if (single.empty())
          printf("Nothing\n");
        else
          printf("%d\n", *single.rbegin());
      }
    } else {
      cnt[a[ii]]++;
      cnt[a[ii - k]]--;
      if (cnt[a[ii]] == 1)
        single.insert(a[ii]);
      else
        single.erase(a[ii]);
      if (cnt[a[ii - k]] == 1)
        single.insert(a[ii - k]);
      else {
        single.erase(a[ii - k]);
      }
      if (single.empty())
        printf("Nothing\n");
      else
        printf("%d\n", *single.rbegin());
    }
  }
}
