#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  map<int, int> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i] = -a[i];
    if (i < k) m[a[i]]++;
  }
  set<int> s;
  for (map<int, int>::iterator i = m.begin(); i != m.end(); i++)
    if (i->second == 1) s.insert(i->first);
  for (int i = k; i < n; i++) {
    if (s.empty())
      cout << "Nothing";
    else
      cout << -(*s.begin());
    cout << endl;
    int pop = a[i - k];
    if (--m[pop] == 1)
      s.insert(pop);
    else
      s.erase(pop);
    int push = a[i];
    if (++m[push] == 1)
      s.insert(push);
    else
      s.erase(push);
  }
  if (s.empty())
    cout << "Nothing";
  else
    cout << -(*s.begin());
  return 0;
}
