#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
set<int> ss;
set<int>::iterator p;
int a[100010];
int main() {
  int n, k;
  while (scanf("%d%d", &n, &k) == 2) {
    mp.clear();
    ss.clear();
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    for (int i = 0; i < k; i++) {
      if (mp.find(a[i]) != mp.end())
        mp[a[i]]++;
      else
        mp[a[i]] = 1;
      if (mp[a[i]] == 1)
        ss.insert(a[i]);
      else
        ss.erase(a[i]);
    }
    if (ss.empty())
      puts("Nothing");
    else {
      p = ss.end();
      p--;
      printf("%d\n", *p);
    }
    for (int i = k; i < n; i++) {
      if (mp.find(a[i]) != mp.end())
        mp[a[i]]++;
      else
        mp[a[i]] = 1;
      if (mp[a[i]] == 1)
        ss.insert(a[i]);
      else
        ss.erase(a[i]);
      mp[a[i - k]]--;
      if (mp[a[i - k]] == 1)
        ss.insert(a[i - k]);
      else
        ss.erase(a[i - k]);
      if (ss.empty())
        puts("Nothing");
      else {
        p = ss.end();
        p--;
        printf("%d\n", *p);
      }
    }
  }
  return 0;
}
