#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  set<long long> st;
  vector<long long> arr(n);
  map<long long, long long> mp;
  for (long long i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  for (long long i = 0; i < k; ++i) {
    if (st.find(arr[i]) != st.end()) {
      st.erase(arr[i]);
    } else {
      if (mp.find(arr[i]) == mp.end()) st.insert(arr[i]);
    }
    mp[arr[i]]++;
  }
  for (long long i = k; i < n; ++i) {
    if (st.size() == 0) {
      cout << "Nothing\n";
    } else {
      cout << *prev(st.end()) << endl;
    }
    mp[arr[i - k]]--;
    if (st.find(arr[i - k]) != st.end()) st.erase(arr[i - k]);
    if (mp[arr[i - k]] == 1) {
      st.insert(arr[i - k]);
    }
    if (mp[arr[i - k]] == 0) {
      mp.erase(arr[i - k]);
    }
    if (st.find(arr[i]) != st.end()) {
      st.erase(arr[i]);
    } else {
      if (mp.find(arr[i]) == mp.end()) st.insert(arr[i]);
    }
    mp[arr[i]]++;
  }
  if (st.size() == 0) {
    cout << "Nothing\n";
  } else {
    cout << *prev(st.end()) << endl;
  }
  return 0;
}
