#include <bits/stdc++.h>
using namespace std;
int arr[100010 + 1], arr1[100010 + 1], cnt[100010 + 1];
set<int> st;
unordered_map<int, int> mp, mprev;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k, x = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    arr1[i] = arr[i];
  }
  sort(arr1, arr1 + n);
  mp[arr1[0]] = 0;
  mprev[0] = arr1[0];
  for (int i = 1; i < n; i++)
    if (arr1[i] != arr1[i - 1]) {
      mp[arr1[i]] = ++x;
      mprev[x] = arr1[i];
    }
  for (int i = 0; i < n; i++) arr[i] = mp[arr[i]];
  for (int i = 0; i < k; i++) {
    cnt[arr[i]]++;
    if (cnt[arr[i]] == 1)
      st.insert(-1 * arr[i]);
    else
      st.erase(-1 * arr[i]);
  }
  if (st.empty())
    cout << "Nothing\n";
  else
    cout << mprev[(*(st.begin())) * (-1)] << "\n";
  for (int i = k; i < n; i++) {
    cnt[arr[i]]++;
    if (cnt[arr[i]] == 1)
      st.insert(-1 * arr[i]);
    else
      st.erase(-1 * arr[i]);
    cnt[arr[i - k]]--;
    if (cnt[arr[i - k]] == 1)
      st.insert(-1 * arr[i - k]);
    else
      st.erase(-1 * arr[i - k]);
    if (st.empty())
      cout << "Nothing\n";
    else
      cout << mprev[(*(st.begin())) * (-1)] << "\n";
  }
  return 0;
}
