#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  set<int> s;
  map<int, int> fre;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    int tmp;
    cin >> tmp;
    a[i] = tmp;
    fre[tmp]++;
    if (i - k >= 0) fre[a[i - k]]--;
    if (i - k >= 0 && fre[a[i - k]] == 1)
      s.insert(a[i - k]);
    else if (i - k >= 0 && s.find(a[i - k]) != s.end())
      s.erase(a[i - k]);
    if (fre[tmp] == 1)
      s.insert(tmp);
    else if (s.find(tmp) != s.end())
      s.erase(tmp);
    if (i >= k - 1)
      if (s.size())
        cout << *s.rbegin() << "\n";
      else
        cout << "Nothing\n";
  }
}
