#include <bits/stdc++.h>
using namespace std;
map<int, int> m1;
map<int, int> m2;
map<int, int>::iterator it;
int a[120000];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= k; i++) {
    m1[a[i]]++;
    if (m1[a[i]] == 1) {
      m2.insert(pair<int, int>(a[i], 1));
    } else {
      if (m2.find(a[i]) != m2.end()) m2.erase(a[i]);
    }
  }
  it = m2.end();
  if (it != m2.begin()) it--;
  if (m2.empty())
    cout << "Nothing" << endl;
  else
    cout << it->first << endl;
  for (int i = k + 1; i <= n; i++) {
    m1[a[i]]++;
    m1[a[i - k]]--;
    if (m1[a[i]] == 1) {
      m2.insert(pair<int, int>(a[i], 1));
    } else {
      if (m2.find(a[i]) != m2.end()) m2.erase(a[i]);
    }
    if (m1[a[i - k]] == 1) {
      m2.insert(pair<int, int>(a[i - k], 1));
    } else {
      if (m2.find(a[i - k]) != m2.end()) m2.erase(a[i - k]);
    }
    it = m2.end();
    if (it != m2.begin()) it--;
    if (m2.empty())
      cout << "Nothing" << endl;
    else
      cout << it->first << endl;
  }
  return 0;
}
