#include <bits/stdc++.h>
using namespace std;
map<int, int> m;
set<int> s;
int n, k, t, c[100010];
int main() {
  cin >> n >> k;
  for (int ii = 0; ii < n; ii++) {
    cin >> t;
    c[ii] = t;
    if (++m[t] == 1)
      s.insert(t);
    else
      s.erase(t);
    if (ii < k - 1) continue;
    t = c[ii - k];
    if (--m[t] == 1)
      s.insert(t);
    else
      s.erase(t);
    if (s.size())
      cout << *(--(s.end())) << endl;
    else
      cout << "Nothing" << endl;
  }
}
