#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
template <class T>
void pv(T a, T b) {
  for (T i = a; i != b; ++i) cout << *i << " ";
  cout << endl;
}
const int maxn = 1e5 + 10;
int a[maxn], n, k;
map<int, int> m;
map<int, int>::iterator miter;
struct S {
  int freq, val;
  bool operator<(S s) const {
    if (freq != s.freq) return freq < s.freq;
    return val > s.val;
  }
};
set<S> s;
set<S>::iterator siter;
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  for (int i = 0; i < k - 1; i++) {
    m[a[i]]++;
  }
  for (miter = m.begin(); miter != m.end(); miter++) {
    S ns = {miter->second, miter->first};
    s.insert(ns);
  }
  int apaga = 0;
  for (int i = k - 1; i < n; i++) {
    if (m[a[i]]) {
      siter = s.find((S){m[a[i]], a[i]});
      s.erase(siter);
    }
    s.insert((S){++m[a[i]], a[i]});
    if (s.size() && s.begin()->freq <= 1) {
      printf("%d\n", s.begin()->val);
    } else {
      printf("Nothing\n");
    }
    siter = s.find((S){m[a[apaga]], a[apaga]});
    s.erase(siter);
    if (--m[a[apaga]]) {
      s.insert((S){m[a[apaga]], a[apaga]});
    }
    apaga++;
  }
  return 0;
}
