#include <bits/stdc++.h>
using namespace std;
const int N = 300003;
bool dp[401][401][2][2], vis[401][401][2][2];
int n, d;
vector<pair<int, int> > vec;
int main() {
  int n, k, x;
  scanf("%d%d", &n, &k);
  map<int, int> freq;
  set<int> st;
  vector<int> vec(n);
  for (int i = 0; i < k; i++) {
    scanf("%d", &x);
    vec[i] = x;
    freq[x]++;
    if (freq[x] == 1)
      st.insert(x);
    else if (freq[x] == 2)
      st.erase(st.find(x));
  }
  if (st.empty())
    printf("Nothing\n");
  else
    printf("%d\n", *st.rbegin());
  for (int i = k; i < n; i++) {
    scanf("%d", &vec[i]);
    freq[vec[i]]++;
    if (freq[vec[i]] == 1)
      st.insert(vec[i]);
    else if (freq[vec[i]] == 2)
      st.erase(st.find(vec[i]));
    freq[vec[i - k]]--;
    if (freq[vec[i - k]] == 1)
      st.insert(vec[i - k]);
    else if (!freq[vec[i - k]])
      st.erase(st.find(vec[i - k]));
    if (st.empty())
      printf("Nothing\n");
    else
      printf("%d\n", *st.rbegin());
  }
  return 0;
}
