#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
int aa[N];
map<int, int> mp;
set<int> s;
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> aa[i];
  for (int i = 0; i < n; i++) {
    mp[aa[i]]++;
    if (mp[aa[i]] == 1)
      s.insert(aa[i]);
    else
      s.erase(aa[i]);
    int j = i - k;
    if (j >= 0) {
      mp[aa[j]]--;
      if (mp[aa[j]] == 1)
        s.insert(aa[j]);
      else
        s.erase(aa[j]);
    }
    if (i >= k - 1)
      if (!s.empty())
        cout << *--s.end() << '\n';
      else
        cout << "Nothing\n";
  }
  return 0;
}
