Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

# 2019-11-18 17:34:23(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# import re
# import heapq
# import array
# from scipy.misc import comb # (default: exact=False)
# import numpy as np 



def main():
    n, s = sys.stdin.read().split()
    n = int(n)
    
    # a = [0 for _ in range(n)]
    # i = j = 0
    # while i < n:
    #     while i+j < n and s[j] == s[i+j]: 
    #         j += 1
    #     a[i] = j
    #     if j == 0:
    #         i += 1 
    #         continue
    #     k = 1
    #     while i+k < n and k+a[k] < j:
    #         a[i+k] = a[k]
    #         k += 1
    #     i += k
    #     j -= k

    # print(max(l for l in a if l <= n // 2))
    # print(a)
    

    # a = [0 for _ in range(n)]
    
    # i, j = 0, 0
    # while i < n:
    #     while i+j < n and s[j] == s[i+j]:
    #         j += 1
    #     a[i] = j
    #     if j == 0:
    #         i += 1
    #         continue
    #     k = 1
    #     while i+k < n and k+a[k] < j:
    #         a[i+k] = a[k]
    #         k += 1
    #     i += j
    #     j = 0
    # print(a)

    # a = [0 for _ in range(n)]
    # a[0] = n 
    # c = 0
    # for i in range(1, n):
    #     if i+a[i-c] < c+a[c]:
    #         a[i] = a[i-c]
    #     else:
    #         j = max(0, c+a[c]-i)
    #         while i+j < n and s[s] == s[i+j]:
    #             j += 1
    #         a[i] = j
    
    # print(a)

    # zz = [[0 for _ in range(n)] for _ in range(n)]
    ans = [0 for _ in range(n)]
    for k in range(n):
        # z = zz[k]
        z = [0 for _ in range(n)]
        sub = s[k:]
        for i in range(1, len(sub)):
            count = 0
            for j in range(len(sub)-i):
                if sub[j] == sub[i+j]:
                    count += 1
                    if count == n // 2:
                        break
                else:
                    break
            z[i] = count
        ans[k] = max(z)
        # zz[k] = z
    print(max(ans))






if __name__ == "__main__":
    main()


### FIXED CODE ###

# 2019-11-18 17:34:23(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# import re
# import heapq
# import array
# from scipy.misc import comb # (default: exact=False)
# import numpy as np 


def main():
    n, s = sys.stdin.read().split()
    n = int(n)

    ans = 0
    i, j = 0, 1
    while j < n:
        t = s[i:j]
        if t in s[j:]:
            ans = max(ans, j - i)
            j += 1
        else:
            i += 1
    print(ans)
    
if __name__ == "__main__":
    main()
### BUGGY CODE ###

def roooot(arr, i):
    tmp = i
    while len(arr[i]) != 1:
        i = arr[i][-1]-1
        arr[tmp].append(i+1)

n, q = map(int, input().split())
cnt = [0]*n
root = [[i+1] for i in range(n)]

for i in range(n-1):
    a, b = map(int, input().split())
    root[b-1].append(a)
    roooot(root, b-1)

for i in range(q):
    p, x = map(int, input().split())
    for j in range(len(root)):
        if p in root[j]: cnt[j] += x
print(*cnt)

### FIXED CODE ###

from sys import stdin
n, q = map(int, input().split())
cnt = [0]*n
root = [[] for i in range(n)]

for i in range(n-1):
    a, b = map(int, stdin.readline().split())
    root[a-1].append(b-1)

for i in range(q):
    p, x = map(int, stdin.readline().split())
    cnt[p-1] += x

tmparr = [0]
while tmparr:
    tmpi = tmparr.pop()
    for i in root[tmpi]:
        cnt[i] += cnt[tmpi]
    tmparr += root[tmpi]
print(*cnt)
### BUGGY CODE ###

import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines


# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
# import numpy as np

import bisect

def main():
	s=input().rstrip().decode('utf-8')
	t=input().rstrip().decode('utf-8')
	slen=len(s)
	tlen=len(t)
	
	dp=[[0]*(slen+1) for _ in range(tlen+1)]
	pr=[[0]*(slen+1) for _ in range(tlen+1)]
	
	
	for i in range(tlen):
		for j in range(slen):
			if s[j]==t[i]:
				dp[i+1][j+1]=dp[i][j]+1
				pr[i+1][j+1]=1
			elif dp[i][j+1]<dp[i+1][j]:
				dp[i+1][j+1]=dp[i+1][j]
				pr[i + 1][j + 1] = 2
			else:
				dp[i+1][j+1]=dp[1][j+1]
				pr[i + 1][j + 1] = 3
	
	ss=slen
	tt=tlen
	ans=""
	while ss>0 and tt>0:
		if pr[tt][ss]==1:
			ans+=s[ss-1]
			tt-=1
			ss-=1
		elif pr[tt][ss]==2:
			ss-=1
		else:
			tt-=1
	print(ans[::-1])
	
	
	
if __name__ == "__main__":
	main()


### FIXED CODE ###

import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines


# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
# import numpy as np

def main():
	s=input().rstrip().decode('utf-8')
	t=input().rstrip().decode('utf-8')
	slen=len(s)
	tlen=len(t)
	
	dp=[[0]*(slen+1) for _ in range(tlen+1)]
	pr=[[0]*(slen+1) for _ in range(tlen+1)]
	
	
	for i in range(tlen):
		for j in range(slen):
			if s[j]==t[i]:
				dp[i+1][j+1]=dp[i][j]+1
				pr[i+1][j+1]=1
			elif dp[i][j+1]<dp[i+1][j]:
				dp[i+1][j+1]=dp[i+1][j]
				pr[i + 1][j + 1] = 2
			else:
				dp[i+1][j+1]=dp[i][j+1]
				pr[i + 1][j + 1] = 3
	
	ss=slen
	tt=tlen
	ans=""
	while ss>0 and tt>0:
		if pr[tt][ss]==1:
			ans+=s[ss-1]
			tt-=1
			ss-=1
		elif pr[tt][ss]==2:
			ss-=1
		else:
			tt-=1
	print(ans[::-1])
	
	
	
if __name__ == "__main__":
	main()
### BUGGY CODE ###

from collections import deque
s=input()
q=int(input())
sd=deque()
for i in range(len(s)):
    sd.append(s[i])

for i in range(q):
    que=list(map(str,input().split()))
    if int(que[0])==1:
        sd=deque(reversed(sd))
    else:
        if int(que[1])==1:
            sd.appendleft(str(que[2]))
        else:
            sd.append(str(que[2]))

ans=''.join(sd)
print(ans)

### FIXED CODE ###

from collections import deque
s=input()
q=int(input())
sd=deque()
for i in range(len(s)):
    sd.append(s[i])
count=0
for i in range(q):
    que=list(map(str,input().split()))
    if int(que[0])==1:
        count+=1
    else:
        if int(que[1])==1:
            if count%2==0:
                sd.appendleft(str(que[2]))
            else:
                sd.append(str(que[2]))
        else:
            if count%2==0:
                sd.append(str(que[2]))
            else:
                sd.appendleft(str(que[2]))
if count%2!=0:
    sd.reverse()

ans=''.join(sd)
print(ans)
### BUGGY CODE ###

N = int(input())
A = [0]
A += list(map(int, input().split()))
A += [0]

cost = [abs(A[i] - A[i+1]) for i in range(N+1)]

for i in range(N):
    ans = sum(cost[:i]+cost[i+2:])
    ans += abs(A[i] - A[i+2])
    print(ans)

### FIXED CODE ###

N = int(input())
A = [0]
A += list(map(int, input().split()))
A += [0]

cost = [abs(A[i] - A[i+1]) for i in range(N+1)]
original_cost = sum(cost)

for i in range(N):
    ans = original_cost
    ans -= cost[i]
    ans -= cost[i+1]
    ans += abs(A[i] - A[i+2])
    
    print(ans)
### BUGGY CODE ###

import math
x = int(input())
if x > 0:
    for a in range(-1, x):
        for b in range(-1, x):
            check = math.pow(a, 5) - math.pow(b, 5)
            if check == x:
                print(f'{a} {b}')
                break


### FIXED CODE ###

import math
def factorial(x):
    max_num = int(2 * (10 ** 9) ** (1 / 5))
    for a in range(-1 * max_num, max_num):
        for b in range(-1 * max_num, max_num):
            check = math.pow(a, 5) - math.pow(b, 5)
            if check == x:
                return f'{a} {b}'


x = int(input())
print(factorial(x))
### BUGGY CODE ###

import sys
sys.setrecursionlimit(20000000)
N = int(input()) #社員数
joushi_no_bangou = [0] #上司の社員番号
ans = []
joushi_no_bangou += map(int,input().split())

#==--------------

for i in range(N):
    print(joushi_no_bangou.count(i+1))

### FIXED CODE ###

N = int(input())
As = list(map(int, input().split()))
ct = [0] * N
     
for a in As: #ここがキモ．リスト「As」にはそれぞれの上司が入っていて，その中からaを取り出すので，a=上司になっている．これにより，ctの上司を正確に呼び出すことができる．
    ct[a-1] += 1
     
for c in ct:
    print(c)

#別解
#print(*c,sep='\n')
### BUGGY CODE ###

import sys
def h(i):
 l=2*i;r=l+1
 if r<=H:
  if A[i]<A[l]:
   if A[l]<A[r]:A[i],A[r]=A[r],A[i];h(r)
   else:A[i],A[l]=A[l],A[i];h(l)
  elif A[i]<A[r]:A[i],A[r]=A[r],A[i];h(r)
 elif l<=H and A[i]<A[l]:A[i],A[l]=A[l],A[i];h(l)
H=0
A=[0]*2000001
o=[]
for e in sys.stdin:
 if'i'==e[0]:
  H+=1;A[H]=int(e[7:]);k=H
  while k>1 and A[k//2]<A[k]:A[k],A[k//2]=A[k//2],A[k];k//=2
 elif'x'==e[1]:
  o+=[A[1]];H-=1
  if H:A[1]=A[H+1];h(1)
print('\n'.join(map(str,o)))


### FIXED CODE ###

import sys
from heapq import*
H=[]
O=[]
for e in sys.stdin:
 if'i'==e[0]:heappush(H,-int(e[7:]))
 elif't'==e[2]:O+=[-heappop(H)]
 else:print('\n'.join(map(str,O)))
### BUGGY CODE ###


def main():
    N, M = [int(n) for n in input().split()]
    A = [int(n) for n in input().split()]
    B = [0]*(N+1)
    B[0] = 0
    d = {}
    accum = 0
    for i in range(N+1):
        B[i] = accum
        if i != N:
            accum += A[i]
    
    for i, b in enumerate(B):
        x = b % M
        if x in d.keys():
            d[x] += 1
        else:
            d[x] = 1
    # print(B)
    print(sum([i * (i - 1)//2 for i in d.values()]))
        
# import os,sys, time

# current = os.path.abspath(__file__ + "/..")+"/"
# fdr = open(current + "d-case1.txt", "r")
# sys.stdin = fdr
# t = time.time()
# main()
# print(time.time() - t)

main()


### FIXED CODE ###


def main():
    N, M = [int(n) for n in input().split()]
    A = [int(n) for n in input().split()]
    B = [0]*(N+1)
    B[0] = 0
    d = {}
    accum = 0
    for i in range(N+1):
        B[i] = accum
        if i != N:
            accum += A[i]
    
    for i, b in enumerate(B):
        x = b % M
        if x in d.keys():
            d[x] += 1
        else:
            d[x] = 1
    # print(B)
    print(sum([i * (i - 1)//2 for i in d.values()]))
        
# import os,sys, time

# current = os.path.abspath(__file__ + "/..")+"/"
# fdr = open(current + "d-case1.txt", "r")
# sys.stdin = fdr
# t = time.time()
# main()
# print(time.time() - t)
if __name__ == "__main__":
    main()
### BUGGY CODE ###

S = list(map(int, input().split()))
N = S[0]
K = S[1]
Q = S[2]

point = [K] * N
A = []
for q in range(Q):
    A.append(int(input()) - 1)

for a in A:
    point = list(map(lambda x: x - 1, point))
    point[a] += 1

for ans in point:
    if ans < 1:
        print("No")
    else:
        print("Yes")



### FIXED CODE ###

S = list(map(int, input().split()))
N = S[0]
K = S[1]
Q = S[2]

point = [K] * N
A = []
for q in range(Q):
    A.append(int(input()) - 1)

for a in A:
    point[a] += 1

for ans in point:
    if ans <= Q:
        print("No")
    else:
        print("Yes")
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10**9)
n,m=map(int,input().split())
a=[[]for i in range(n+m)]
for i in range(n):
    s=list(map(int,input().split()))
    for j in s[1:]:
        a[i].append(j)
        a[n+j-1].append(i)
t=[False]*n
def g(x):
    if not t[x]:
        t[x]=True
        for i in a[x]:
            for j in a[i+n-1]:
                g(j)
g(0)
if all(t):
    print("YES")
else:
    print("NO")

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)
n,m=map(int,input().split())
a=[[]for i in range(n+m)]
for i in range(n):
    s=list(map(int,input().split()))
    for j in s[1:]:
        a[i].append(j+n-1)
        a[n+j-1].append(i)
t=[False]*(n+m)
def g(x):
    t[x]=True
    for i in a[x]:
            if not t[i]:
                g(i)
g(0)
if all(t[:n]):
    print("YES")
else:
    print("NO")
### BUGGY CODE ###

import sys

class LinkedListNode:
    def __init__(self, key, prev_node, next_node):
        self.key = key
        self.prev_node = prev_node
        self.next_node = next_node

class LinkedList:
    def __init__(self):
        self.front_node = None
        self.last_node = None
        self.size = 0

    def insert(self, key):
        new_node = LinkedListNode(key, None, self.front_node)
        if self.front_node != None:
            self.front_node.prev_node = new_node
        self.front_node = new_node
        if self.last_node == None:
            self.last_node = new_node
        self.size += 1

    def delete(self, key):
        node = self.front_node
        while node != None:
            if node.key == key:
                if node == self.front_node:
                    self.front_node = self.front_node.next_node
                if node == self.last_node:
                    self.last_node = self.last_node.prev_node
                if node.prev_node != None:
                    node.prev_node.next_node = node.next_node
                if node.next_node != None:
                    node.next_node.prev_node = node.prev_node
                self.size -= 1
                break
            node = node.next_node

    def delete_first(self):
        if self.size == 0:
            return
        elif self.size == 1:
            self.front_node = None
            self.last_node = None
            self.size -= 1
        else:
            self.front_node = self.front_node.next_node
            self.front_node.prev_node = None
            self.size -= 1

    def delete_last(self):
        if self.size == 0:
            return
        elif self.size == 1:
            self.front_node = None
            self.last_node = None
            self.size -= 1
        else:
            self.last_node = self.last_node.prev_node
            self.last_node.next_node = None
            self.size -= 1

    def to_a(self):
        a = []
        node = self.front_node
        while node != None:
            a.append(node.key)
            node = node.next_node
        return a

l = LinkedList()
n = int(input())
lines = sys.stdin.readlines()
for i in range(n):
    ins = lines[i].split()
    command = ins[0]
    if command == "insert":
        x = int(ins[1])
        l.insert(x)
    elif command == "delete":
        x = int(ins[1])
        l.delete(x)
    elif command == "deleteFirst":
        l.delete_first()
    elif command == "deleteLast":
        l.delete_last()

print(" ".join(map(str, l.to_a())))

### FIXED CODE ###

import sys
from collections import deque

d = deque()
n = int(input())
lines = sys.stdin.readlines()
for i in range(n):
    ins = lines[i].split()
    command = ins[0]
    if command == "insert":
        d.appendleft(ins[1])
    elif command == "delete":
        try:
            d.remove(ins[1])
        except:
            pass
    elif command == "deleteFirst":
        d.popleft()
    elif command == "deleteLast":
        d.pop()

print(" ".join(d))
### BUGGY CODE ###

def base10toN(num, base):
    converted_string, modstring = "", ""
    currentnum = num
    if not num:
        return '0'
    while currentnum:
        mod = currentnum % base
        currentnum = currentnum // base
        converted_string = chr(48 + mod + 7*(mod > 10)) + converted_string
    return converted_string
n=int(input())
popcount=[]
for i in range(1,2*10**5+1):
  temp=base10toN(i,2)
  ans=0
  for j in range(len(temp)):
    if temp[j]=='1':
      ans+=1
  popcount.append(ans)
x=input()
xint=int(x, 2)
ones=0
for i in range(n):
  if x[i]=='1':
    ones+=1
for i in range(n):
  counter=0
  if x[i]=='0':
    temp=xint+pow(2,n-1-i)
    temp1=ones+1
  else:
    temp=xint-pow(2,n-1-i)
    temp1=ones-1
  ans=0
  while temp!=0:
    temp=temp%temp1
    temp1=popcount[temp-1]
    ans+=1
  print(ans)
    

### FIXED CODE ###

def base10toN(num, base):
    converted_string, modstring = "", ""
    currentnum = num
    if not num:
        return '0'
    while currentnum:
        mod = currentnum % base
        currentnum = currentnum // base
        converted_string = chr(48 + mod + 7*(mod > 10)) + converted_string
    return converted_string
n=int(input())
pop=[0]*(2*10**5+1)
for i in range(1,2*10**5+1):
  temp=base10toN(i,2)
  ans=0
  for j in range(len(temp)):
    if temp[j]=='1':
      ans+=1
  r=i%ans
  pop[i]=pop[r]+1
x=input()
ones=0
ans1=[]
for i in range(n):
  if x[i]=='1':
    ones+=1
dividemore=0
divideless=0
for i in range(n):
  if x[i]=='1':
    dividemore=(pow(2,n-1-i,ones+1)+dividemore)%(ones+1)
    if ones>=2:
      divideless=(pow(2,n-1-i,ones-1)+divideless)%(ones-1)
for i in range(n):
  counter=0
  if x[i]=='0':
    temp=(dividemore+pow(2,n-1-i,ones+1))%(ones+1)
  else:
    if ones==1:
      ans1.append('0')
      continue
    else:
      temp=(divideless-pow(2,n-1-i,ones-1))%(ones-1)
  ans1.append(str(pop[temp]+1))
print(' '.join(ans1))
### BUGGY CODE ###

# coding : utf-8

N,M = map(int,input().split())

b = M//N

print(max([i for i in range(1,b+1) if M%i == 0]))

### FIXED CODE ###

from math import sqrt
 
n, m = map(int, input().split())
l = []
for i in range(1, int(sqrt(m)) + 1):
	if m % i == 0:
		l.append(i)
		l.append(m // i)
 
ans = 1
for d in l:
	if d * n <= m:
		ans = max(ans, d)
 
print(ans)
### BUGGY CODE ###

N,K=map(int,input().split())
A=list(map(int,input().split()))
F=list(map(int,input().split()))

if N==1:
    ans=max(A[0]-K,0)*F[0]
else:
    F.sort(reverse=True) # 降順で固定
    A.sort()

#    print(f'F={F}')
#    print(A)

    while K>0 and A[-1]>0:
#        print(f'A={A}')
        S=sorted([(A[i]*F[i],i) for i in range(N)],reverse=True)
#        print(f'S={S}') #DB
        xym=S[0][0];xys=S[1][0]
        m=S[0][1];s=S[1][1]
        if xym==xys>0:
            A[m]-=1
            K-=1
        else:
            d=xym-xys
            p=min((d+(F[m]-1))//F[m],K,A[m])
            A[m]-=p # 負にならない
            K-=p
        A.sort()
    S=sorted([(A[i]*F[i],i) for i in range(N)],reverse=True)
    ans=max(S)[0]

print(ans)

### FIXED CODE ###

def p(F,A,s): # スコアをsにするために最小限必要な修行の回数
    res=0
    for i in range(N):
        res+=max(A[i]-s//F[i],0)
    return res

N,K=map(int,input().split())
A=list(map(int,input().split()))
F=list(map(int,input().split()))

F.sort(reverse=True) # 降順で固定
A.sort() # 昇順で固定

l=0
r=max([F[i]*A[i] for i in range(N)])

while r-l>1:
    m=(l+r)//2
    if p(F,A,m)<=K:
        r=m
    else:
        l=m

if r>1 or p(F,A,0)>K:
    ans=r
else:
    ans=0

print(ans)
### BUGGY CODE ###

n,m = map(int,input().split())
ab = {i:[] for i in range(1,m+1)}
for i in range(n):
    a,b = map(int,input().split())
    if a in ab:
        ab[a].append(b)
    else:
        ab[a] = [b]
ab = {i:sorted(ab[i],reverse=True) for i in ab}
#print(ab)
ans = 0
for i in range(m)[::-1]:
    rem = m - i
    #print("rem=",rem,"ab[rem]=",ab[rem])
    mx = 0
    fl = -1
    for j in range(1,m-i+1):
        #print("j=",j)
        if ab[j] and mx < ab[j][0]:
            mx = ab[j][0]
            fl = j
            #print("fl=",fl)
    ans += mx
    if fl > 0: del ab[fl][0]
    #print(ans)
print(ans)


### FIXED CODE ###

from heapq import *
n,m = map(int,input().split())
t = [[] for i in range(10**5+1)]
for i in range(n):
    a,b = map(int,input().split())
    t[a].append(b)

ans = 0
h = []
for i in range(1,m+1):
    #print(i,"日目")
    for j in t[i]:
        heappush(h, -j)
        #print("heappush",j)
    if h:
        a = -heappop(h)
        #print("heappop",a)
        ans += a
print(ans)
### BUGGY CODE ###

def resolve_D():
    max_ = 0
    res = 0
    n, k = map(int, input().split())
    l = list(map(int, input().split()))
    for i in range(0, n-k+1):
        total = sum(l[i:i+k])
        if total > max_:
            max_ = total
            max_i = i
    for j in l[max_i:max_i+k]:
        res += sum([i for i in range(1, j+1)]) / j
    print(res)
resolve_D()

### FIXED CODE ###

import numpy as np
N,K = map(int,input().split())
q = list(map(int,input().split()))
q = np.array(q)
 
p = (q + 1) /2
p = p.tolist()
a = sum(p[:K])
mx = a
 
for i in range(0,N-K):
    a = a - p[i] + p[i+K]
    if a > mx:
        mx = a
print(mx)
### BUGGY CODE ###

#!/usr/bin/env python3
import sys

def main():
    field_y_length,field_x_length =  map(int, input().split())
    maze = [input() for i in range(field_y_length)]

    INF = 10**8
    
    max_distance = 0

    def bfs(sx,sy,gx,gy):
        distance = [[INF for i in range(field_x_length)] for j in range(field_y_length)]
        queue = []

        queue.insert(0,(sx,sy))

        distance[sy][sx] = 0

        while len(queue):
            x,y = queue.pop()

            if x == gx and y == gy:
                break

            for i in range(0,4):
                nx,ny = x + [1, 0, -1, 0][i], y + [0, 1, 0, -1][i]

                if (0 <= nx and nx < field_x_length and 0 <= ny):
                    if (ny < field_y_length and maze[ny][nx] != '#'):
                        if (distance[ny][nx] == INF):
                            queue.insert(0, (nx, ny))
                            distance[ny][nx] = distance[y][x] + 1
        
        return distance[gy][gx]

    for sx in range(field_x_length):
        for sy in range(field_y_length):
            if maze[sy][sx] == '#':
                continue
            for gx in range(field_x_length):
                for gy in range(field_y_length):
                    if maze[gy][gx] == '#' or (gx == sx and gy == sy):
                        continue
                    max_distance = max(max_distance,bfs(sx,sy,gx,gy))
    print(max_distance)
    

if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3
from itertools import product

def main():
    field_y_length,field_x_length =  map(int, input().split())
    maze = [input() for i in range(field_y_length)]

    INF = 10**8
    
    max_distance = 0

    def bfs(sy,sx):
        distance = [[INF for i in range(field_x_length)] for j in range(field_y_length)]
        queue = []

        queue.insert(0,(sy,sx))

        distance[sy][sx] = 0

        res = 0

        while len(queue):
            y,x = queue.pop()

            for i in range(0,4):
                ny,nx = y + [1, 0, -1, 0][i], x + [0, 1, 0, -1][i]

                if (0 <= nx and nx < field_x_length and 0 <= ny):
                    if (ny < field_y_length and maze[ny][nx] != '#'):
                        if (distance[ny][nx] == INF):
                            queue.insert(0, (ny, nx))
                            distance[ny][nx] = distance[y][x] + 1
                            res = max(res,distance[y][x] + 1)
        
        return res

    
    for y,x in product(range(field_y_length),range(field_x_length)):
        if maze[y][x] == '#':
            continue
        max_distance = max(max_distance,bfs(y,x))
    print(max_distance)
    

if __name__ == "__main__":
    main()
### BUGGY CODE ###

def resolve():
    A, B, K = [int(i) for i in input().split()]
    numbers = [i for i in range(A, B + 1)]
    ans = numbers[:K]
    ans.extend(numbers[-K:])
    print(*sorted(set(ans)), sep="\n")


resolve()


### FIXED CODE ###

def resolve():
    A, B, K = [int(i) for i in input().split()]
    offset = 0
    while offset < K and A + offset <= B:
        print(A + offset)
        offset += 1
    begin = A + offset
    r = max(B - K + 1, begin)
    while r <= B:
        print(r)
        r += 1


resolve()
### BUGGY CODE ###

a,b,k=map(int,input().split())
d=[i for i in range(a,b+1)]
ans=[]
n=len(d)
if n>=2*k:
  for i in range(k):
    ans.append(d[i])
    ans.append(d[n-1-i])
elif k<=n<2*k:
  for i in range(k):
    ans.append(d[i])
  for j in range(n-k):
    ans.append(d[n-1-j])
elif n<k:
  for i in range(n):
    ans.append(d[i])
    
ans.sort()
for i in ans:
  print(i)

### FIXED CODE ###

a, b, k = map(int, input().split())

if b-a <= k:
  for i in range(a, b+1):
    print(i)
else:
  ans = []
  for i in range(a, a+k):
    if i not in ans:
      ans.append(i)
      print(i)
  for j in range(b-k+1, b+1):
    if j not in ans:
      print(j)
### BUGGY CODE ###

n, k = map(int, input().split())
a_list = list(map(int, input().split()))

score = [1] * (n - k + 1)

for i in range(k):
    score[0] *= a_list[i]

for i in range(1, n-k+1):
    score[i] = (score[i-1] / a_list[i-1]) * a_list[k+i-1]

for i in range(len(score)-1):
    if score[i+1] - score[i] > 0:
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

n, k = map(int, input().split())
a_list = list(map(int, input().split()))

for i in range(n-k):
    if a_list[i] < a_list[k+i]:
        print("Yes")
    else:
        print("No")