#include <bits/stdc++.h>
int ex[] = {1, -1, 0, 0};
int wye[] = {0, 0, 1, -1};
using namespace std;
int n, k, a[100005];
set<int> st;
set<int>::reverse_iterator it;
map<int, int> mp;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= k; i++) {
    mp[a[i]]++;
    if (mp[a[i]] == 1)
      st.insert(a[i]);
    else if (mp[a[i]] == 2)
      st.erase(a[i]);
  }
  it = st.rbegin();
  if (st.empty())
    printf("Nothing\n");
  else
    printf("%d\n", *it);
  for (int i = k + 1, j = 1; i <= n; i++, j++) {
    if (a[i] != a[j]) {
      mp[a[i]]++;
      if (mp[a[i]] == 1)
        st.insert(a[i]);
      else if (mp[a[i]] == 2)
        st.erase(a[i]);
      mp[a[j]]--;
      if (mp[a[j]] == 1)
        st.insert(a[j]);
      else if (mp[a[j]] == 0)
        st.erase(a[j]);
    }
    it = st.rbegin();
    if (st.empty())
      printf("Nothing\n");
    else
      printf("%d\n", *it);
  }
  return 0;
}
