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

n = int(input())
a = list(map(int,input().split()))
b = []
for i in range(n):
  b.append(a[i])
  b = list(reversed(b))
print(*b)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
o = []
e = []
for i in range(n):
  if i%2 == 0:e.append(a[i])
  else: o.append(a[i])

if n%2 == 0:
  b = list(reversed(o))+e
else:
  b = list(reversed(e))+o
print(*b)
### BUGGY CODE ###

from collections import defaultdict
import heapq

N = int(input())
mm = defaultdict(int)

for i in range(N):
    key = input()
    mm[key] += 1


max_mms = [kv for kv in mm.items() if kv[1] == max(mm.values()) ]
max_mms.sort()

for i,k in max_mms:
    print(i)


### FIXED CODE ###

from collections import defaultdict
N = int(input())
mm = defaultdict(int)

for i in range(N):
    key = input()
    mm[key] += 1

max_val= max(mm.values())
mm_max = []
for kv in mm.items():
    if kv[1] == max_val:
        mm_max.append(kv)

mm_max.sort()
for v in mm_max:
    print(v[0])
### BUGGY CODE ###

inf=float('inf')
s=input()[::-1]
n=len(s)
dp=[2*[inf]for _ in range(n)]
dp[0]=[int(s[0]),10-int(s[0])]
for i in range(1,n):
  if s[i]=="9":
    dp[i][1]=min(dp[i-1][1],dp[i-1][0]+1)
    dp[i][0]=dp[i-1][0]+9
  else:
    dp[i][0]=int(s[i])+min(dp[i-1][0],dp[i-1][1]+1)
    dp[i][1]=min(9-int(s[i])+dp[i-1][1],10-int(s[i])+dp[i-1][0])
print(min(dp[n-1][0],dp[n-1][1]+1))
#for i in dp:print(*i)

### FIXED CODE ###

inf=float('inf')
s=input()[::-1]
n=len(s)
dp=[2*[inf]for _ in range(n)]
dp[0]=[int(s[0]),10-int(s[0])]
for i in range(1,n):
  if s[i]=="9":
    dp[i][1]=min(dp[i-1][1],dp[i-1][0]+1)
    dp[i][0]=dp[i-1][0]+9
  else:
    dp[i][0]=int(s[i])+min(dp[i-1][0],dp[i-1][1]+1)
    dp[i][1]=min(9-int(s[i])+dp[i-1][1],10-int(s[i])+dp[i-1][0])
print(min(dp[n-1][0],dp[n-1][1]+1))
#for i in dp:print(*i)
### BUGGY CODE ###

n, k = list(map(int,input().split()))
dp = [0]*n
a = list(map(int, input().split()))

for i in range(1, n):
  dp[i] =  min([dp[i-j-1]+abs(a[i]-a[i-j-1]) for j in range(min(k, i))])
print(dp[n-1])

### FIXED CODE ###

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

dp = [10**9+1]*n
dp[0] = 0
dp[1] = dp[0] + abs(h[1]-h[0])

for i in range(2, n): 
    dp[i] = min([dp[i-j]+abs(h[i]-h[i-j]) for j in range(1, min(k, i)+1)])

print(dp[n-1])
### BUGGY CODE ###

N = int(input())

num_list = [int(input()) for i in range(N)]

for cnt in range(N):
  print(max(num_list[:cnt] + num_list[cnt+1:]))

### FIXED CODE ###

N = int(input())
num_list = [int(input()) for i in range(N)]
max_num = max(num_list)
max_num_num = num_list.count(max_num)

for cnt in range(N):
  if num_list[cnt] == max_num and max_num_num == 1:
    print(max(num_list[0:cnt] + num_list[cnt+1:]))
  else:
    print(max_num)
### BUGGY CODE ###

k = int(input())

ans = 0
def gcd(x,y):
    while y:
        x, y = y, x % y
    return x

for i in range(1,k+1):
    for j in range(1,k+1):
        for s in range(1,k+1):
            ans += gcd(gcd(i,j),s)

print(ans)


### FIXED CODE ###

k = int(input())

ans = 0
def gcd(x,y):
    while y:
        x, y = y, x % y
    return x

for i in range(1,k+1):
    for j in range(1,k+1):
        for s in range(1,k+1):
            ans += gcd(gcd(i,j),s)

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

s=str(input())
q=int(input())
kt=0
for k in range(q):
    List=list(map(str,input().split()))
    if(List[0]=="1"):
        kt+=1
    else:
        if(kt%2==1):
            s=s[::-1]
        kt=0
        if(List[1]=="1"):
            List[2]+=s
            s=List[2]
        else:
            s+=List[2]
    # print(s)
if(kt%2==1):
    s=s[::-1]
print(s)



### FIXED CODE ###

from collections import deque
S = deque(input())
Q = int(input())
 
p = 0
 
for i in range(Q):
    query = input().split()
    if query[0]=='1':
        p ^= 1
    else:
        f = int(query[1])-1
        c = query[2]
        if p:
            f ^= 1
        if f:
            S.append(c)
        else:
            S.appendleft(c)
 
if p:
    print(*reversed(S), sep='')
else:
    print(*S, sep='')
### BUGGY CODE ###

A, B = map(int, input().split())
l = [0]*100
s = ''
for i in range(A,B+1,1):
    bi = bin(i)[2:]
    # print(bi)
    for j in range(1,len(bi)+1):
        if bi[-j] == '1':
            l[j] = (l[j]+1)%2
for i in range(len(l)):
    s = s + str(l[-i])
print(int(s, 2))


### FIXED CODE ###

A, B = map(int, input().split())

def XOR(A):
    # 0からAまでの排他的論理和を求める
    if A%4 == 0:
        return A
    elif A%4 == 2:
        return A+1
    elif A%4 == 1:
        return 1
    else:
        return 0

fA = XOR(A-1)
fB = XOR(B)
print(fB^fA)
### BUGGY CODE ###

n = int(input())
lst = [int(i) for i in input().split()]

dic = {}
for i in range(n):
  a = lst[i]
  if a >= n - 1:
    continue
  if a not in dic:
    dic[a] = set()
  dic[a].add(i)
#print(dic)
count = 0
for a in dic.keys():
  set_ = dic[a]
  for index in set_:
    b = a + index
    if b > n:
      continue
    for c in dic.keys():
      j = b + c
      if j in dic[c]:
        count += 1
print(count)


### FIXED CODE ###

n = int(input())
lst = [int(i) for i in input().split()]

dic = {}
count = 0
for i in range(n):
  num = lst[i]
  a = i + num
  if a not in dic:
    dic[a] = 1
  else:
    dic[a] += 1
  b = i - num
  if b in dic:
    count += dic[b]
print(count)
### BUGGY CODE ###

n = int(input())
s = input()

R_inds = [0] * n
G_inds = [0] * n
B_inds = [0] * n

for i in range(n):
    if s[i] == 'R':
        R_inds[i] = i
    elif s[i] == 'G':
        G_inds[i] = i
    else:
        B_inds[i] = i
R_inds = list(set(R_inds))
G_inds = list(set(G_inds))
B_inds = list(set(B_inds))

if s[0] == 'R':
    G_inds.remove(0)
    B_inds.remove(0)
elif s[0] == 'G':
    R_inds.remove(0)
    B_inds.remove(0)
else:
    R_inds.remove(0)
    G_inds.remove(0)

G_len = len(G_inds)
B_len = len(B_inds)
R_len = len(R_inds)

if G_len >= B_len and G_len >= R_len:
    largest = G_inds
    a_inds = B_inds
    b_inds = R_inds
elif B_len >= G_len and B_len >= R_len:
    largest = B_inds
    a_inds = G_inds
    b_inds = R_inds
else:
    largest = R_inds
    a_inds = G_inds
    b_inds = B_inds
    
ans = 0
for r in a_inds:
    for g in b_inds:
        big = max(r,g)
        small = min(r,g)
        bigger = big + (big - small)
        smaller = small - (big - small)
        if (big - small) % 2 == 0:
            middle = (big + small) // 2
        else:
            middle = -1
        
        subans = 0
        subans += len(largest)
        if smaller in largest:
            subans -= 1
        if bigger in largest:
            subans -= 1
        if middle in largest:
            subans -= 1
        if subans > 0:
            ans += subans

print(ans)


### FIXED CODE ###

n = int(input())
s = input()
R_ls = [0] * n
G_ls = [0] * n
B_ls = [0] * n
R_csum = [0] * n
G_csum = [0] * n
B_csum = [0] * n
for i in range(n):
    if s[i] == 'R':
        R_ls[i] = 1
        R_csum[i] = R_csum[i-1] + 1
        G_csum[i] = G_csum[i-1]
        B_csum[i] = B_csum[i-1]
    elif s[i] == 'G':
        G_ls[i] = 1
        G_csum[i] = G_csum[i-1] + 1
        R_csum[i] = R_csum[i-1]
        B_csum[i] = B_csum[i-1]
    else:
        B_ls[i] = 1
        B_csum[i] = B_csum[i-1] + 1
        R_csum[i] = R_csum[i-1]
        G_csum[i] = G_csum[i-1]
ans = 0
for i in range(n-2):
    for j in range(i+1,n-1):
        if (s[i] == 'R' and s[j] == 'G') or (s[i] == 'G' and s[j] == 'R'):
            now = B_csum[-1] - B_csum[j]
            if j + (j-i) < n and s[2*j-i] == 'B':
                now -= 1
        elif (s[i] == 'R' and s[j] == 'B') or (s[i] == 'B' and s[j] == 'R'):
            now = G_csum[-1] - G_csum[j]
            if j + (j-i) < n and s[2*j-i] == 'G':
                now -= 1
        elif (s[i] == 'G' and s[j] == 'B') or (s[i] == 'B' and s[j] == 'G'):
            now = R_csum[-1] - R_csum[j]
            if j + (j-i) < n and s[2*j-i] == 'R':
                now -= 1
        else:
            now = 0
        ans += now
print(ans)
### BUGGY CODE ###

def main():
    import sys
    input = sys.stdin.readline
    class BIT:
        def __init__(self,n):
            self.tree = [0]*(n+1)
            self.size = n
        
        def add(self,i,x):
            while i <= self.size:
                self.tree[i] += x
                i += i&-i
        
        def sum(self,i):
            s = 0
            while i > 0:
                s += self.tree[i]
                i -= i&-i
            return s

    N,Q = map(int,input().split())
    bit = BIT(N)
    C = list(map(int,input().split()))
    query = []
    for i in range(Q):
        l,r = map(int,input().split())
        query.append([l,r,i])
    query.sort(key=lambda x: x[1])
    ans = []
    #良い玉のindexを1-indexで管理する
    colorMemo = [0]*(N+1)
    i = 1
    for q in query:
        l,r,j = q
        #良い玉の情報を更新する
        while i <= r:
            c = C[i-1]
            if colorMemo[c]:
                bit.add(colorMemo[c],-1)
            bit.add(i,1)
            colorMemo[c] = i
            i += 1
        ans.append([j,bit.sum(r)-bit.sum(l-1)])

    ans.sort()
    for a in ans:
        print(a[1])
main()

### FIXED CODE ###

def main():
    import sys
    input = sys.stdin.readline
    class BIT:
        def __init__(self,n):
            self.tree = [0]*(n+1)
            self.size = n
        
        def add(self,i,x):
            while i <= self.size:
                self.tree[i] += x
                i += i&-i
        
        def sum(self,i):
            s = 0
            while i > 0:
                s += self.tree[i]
                i -= i&-i
            return s

    N,Q = map(int,input().split())
    bit = BIT(N)
    C = list(map(int,input().split()))
    query = []
    for i in range(Q):
        l,r = map(int,input().split())
        query.append([l,r,i])
    query.sort(key=lambda x: x[1])
    ans = [0]*Q
    #良い玉のindexを1-indexで管理する
    colorMemo = [0]*(N+1)
    cur = 1
    for q in query:
        l,r,j = q
        #良い玉の情報を更新する
        for i in range(cur,r+1):
            c = C[i-1]
            if colorMemo[c]:
                bit.add(colorMemo[c],-1)
            bit.add(i,1)
            colorMemo[c] = i
        cur = r + 1
        ans[j]=bit.sum(r)-bit.sum(l-1)

    print(*ans, sep="\n")
main()
### BUGGY CODE ###

N,Q=map(int,input().split())
S=list(input())

for i in range(Q) :
  l,r=map(int,input().split())
  s=S[l-1:r]
  c=0
  for j in range(len(s)-1) :
    if s[j]=='A' :
      if s[j+1]=='C' :
        c+=1
  print(c)

### FIXED CODE ###

N,Q=map(int,input().split())
S=input()
s=[0]
for i in range(N) :
  s.append(s[-1]+(1 if S[i:i+2]=='AC' else 0))
for i in range(Q) :
  l,r=map(int,input().split())
  print(s[r-1]-s[l-1])
### BUGGY CODE ###


N = int(input())
A = [[0] * (N-1)]+[list(map(int,input().split())) for _ in range(N)]

idx = [0] * (N+1)
cnt = 0
day = 0
flag_max = [False] * (N+1)
while cnt != N:
    
    error = True
    lst = []
    flag =[True] * (N+1)
    for i in range(1,N+1):
        if flag_max[i]:continue
        if not(flag[i]):continue
        tmp = A[i][idx[i]]
        if not(flag[tmp]):continue
    
        if A[tmp][idx[tmp]] == i:
            lst.append(i)
            idx[tmp] = idx[tmp] + 1
            idx[i] = idx[i] + 1
            if idx[tmp] == N-1:
                cnt += 1
                flag_max[tmp] = True
            if idx[i] == N-1:
                cnt += 1
                flag_max[i] = True
            flag[i] = False
            flag[tmp] = False
            error = False
    if error:
        import sys
        print(-1)
        sys.exit()
    
    day += 1
            
    
    
print(day)
    
    


### FIXED CODE ###

import sys
input = sys.stdin.readline
N = int(input())
A = [[0] * (N-1)]+[list(map(int,input().split())) for _ in range(N)]

idx = [0] * (N+1)
cnt = 0
day = 0
flag_max = [False] * (N+1)
while cnt != N:
    
    error = True
    flag =[False] * (N+1)
    looplist = [i for i in range(1,N+1) if not(flag_max[i])]
    
    for i in looplist:
        if (flag[i]):continue
        tmp = A[i][idx[i]]
        if (flag[tmp]):continue
    
        if A[tmp][idx[tmp]] == i:
            idx[tmp] = idx[tmp] + 1
            idx[i] = idx[i] + 1
            if idx[tmp] == N-1:
                flag_max[tmp] = True
                cnt += 1
            if idx[i] == N-1:
                flag_max[i] = True
                cnt += 1
            flag[i] = True
            flag[tmp] = True
            error = False
    if error:
        print(-1)
        sys.exit()
    
    day += 1
            

    if day > 10000:
        print(N*(N-1)//2)
        sys.exit()
    
    
print(day)
### BUGGY CODE ###

import sys
input = sys.stdin.readline

n,m = map(int, input().split())
qp = [tuple(map(int, input().split())) for _ in range(m)]

qp.sort(key=lambda x:x[1])

ans = 0
pre = 0

while qp:
    a,b = qp.pop(0)
    if pre<a:
        ans += 1
        pre = b-1
print(ans)

### FIXED CODE ###

n,m = map(int, input().split())
qp = [tuple(map(int, input().split())) for _ in range(m)]

qp.sort(key=lambda x:x[1])

ans = 0
pre = 0

while qp:
    a,b = qp.pop(0)
    if pre<a:
        ans += 1
        pre = b-1
print(ans)
### BUGGY CODE ###

def alphas(key):
    value = {}
    for char in key:
        if value.get(char) is None:
            value[char] = 1
        else:
            value[char] += 1
    return value

def main():
    N = int(input())
    anagrams = []
    for i in range(N):
        s = input()
        anagrams.append(s)
    ans = 0
    json = {}
    for key in anagrams:
        value = alphas(key)
        for json_key in json.keys():
            if json[json_key] == value:
                ans += 1
        json[key] = value

    print(ans)

if __name__ == '__main__':
    main()


### FIXED CODE ###

def alphas(key):
    value = {}
    for char in key:
        if value.get(char) is None:
            value[char] = 1
        else:
            value[char] += 1
    return value

def main():
    N = int(input())
    anagrams = []
    for i in range(N):
        s = input()
        anagrams.append(s)
    ans = 0
    dict = {}
    for key in anagrams:
        value = alphas(key)
        dict_key = str(sorted(value.items()))
        if dict.get(dict_key) is None:
            dict[dict_key] = 1
        else:
            dict[dict_key] += 1
        """
        for json_key in json.keys():
            if json[json_key] == value:
                ans += 1
                continue
        json[key] = value
        """
    for value in dict.values():
        ans += value * (value - 1) / 2
    print(int(ans))

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

import collections
q=collections.deque()
h,w=map(int,input().split())
arr=[[] for _ in range(h+2)]
for i in range(w+2):
  arr[0].append('#')
for i in range(h):
  arr[i+1].append('#')
  for j in input():
    arr[i+1].append(j)
  arr[i+1].append('#')
for i in range(w+2):
  arr[h+1].append('#')
dx=[-1,0,1,0]
dy=[0,-1,0,1]
for i in range(1,h+1):
  for j in range(1,w+1):
    if arr[i][j]=='#':
      q.append([i,j,0])
while 1:
  y,x,cnt=q.popleft()
  for i in range(4):
    if arr[y+dy[i]][x+dx[i]]=='.':
      q.append([y+dy[i],x+dx[i],cnt+1])
      arr[y+dy[i]][x+dx[i]]='#'
  if len(q)==0:
    print(cnt)
    break

### FIXED CODE ###

import collections
q=collections.deque()
h,w=map(int,input().split())
arr=[[] for _ in range(h+2)]
for i in range(w+2):
  arr[0].append('#')
for i in range(h):
  arr[i+1].append('#')
  for j in input():
    arr[i+1].append(j)
  arr[i+1].append('#')
for i in range(w+2):
  arr[h+1].append('#')
dx=[-1,0,1,0]
dy=[0,-1,0,1]
for i in range(1,h+1):
  for j in range(1,w+1):
    if arr[i][j]=='#':
      q.append([i,j,0])
while 1:
  y,x,cnt=q.popleft()
  for i in range(4):
    if arr[y+dy[i]][x+dx[i]]=='.':
      q.append([y+dy[i],x+dx[i],cnt+1])
      arr[y+dy[i]][x+dx[i]]='#'
  if len(q)==0:
    print(cnt)
    break
### BUGGY CODE ###

import collections

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

dic = collections.defaultdict(lambda:[])
pairs = []

for _ in range(M):
  P, Y = map(int, input().split())
  pairs.append((P, Y))
  dic[P].append(Y)

for key in dic:
  dic[key].sort()

while pairs:
  P, Y = pairs.pop(0)
  print(str(P).zfill(6) + str(dic[P].index(Y)+1).zfill(6))


### FIXED CODE ###

from bisect import bisect_right

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

Ps, Ys, vals = [], [], {}
for i in range(M):
  P, Y = map(int, input().split())
  Ps.append(P)
  Ys.append(Y)

  if P not in vals:
    vals[P] = []
  vals[P].append(Y)

for P in vals:
  vals[P].sort()

for i in range(M):
  pref = str(Ps[i]).zfill(6)
  city = str(bisect_right(vals[Ps[i]], Ys[i])).zfill(6)
  print(pref + city)
### BUGGY CODE ###

def search_delete(data):
    del_target = -1
    max_count = 1
    for i in range(len(data)):
        count = 0
        for j in range(i+1, len(data)):
            if data[i][1] > data[j][0]:
                count += 1
            else:
                break
        if count >= max_count:
            del_target = i
            max_count = count
    if del_target != -1:
        data.pop(del_target)
        return True
    return False


def main():
    n = int(input())
    data = []
    for i in range(n):
        x, l = map(int, input().split())
        data.append([x-l, x+l])
    data.sort(key=lambda x: x[0])

    remove = []
    for i in range(len(data)-1):
        if data[i][1] < data[i+1][0]:
            remove.append(data[i])

    for x in remove[:]:
        data.remove(x)

    flg = True
    while flg:
        flg = search_delete(data)

    print(len(remove)+len(data))


main()


### FIXED CODE ###

def main():
    n = int(input())
    data = []
    for i in range(n):
        x, l = map(int, input().split())
        data.append([x-l, x+l])
    data.sort(key=lambda x: x[1])

    ans = 1
    min_value = data[0][1]
    for i in range(1, n):
        if min_value <= data[i][0]:
            ans += 1
            min_value = data[i][1]

    print(ans)


main()
### BUGGY CODE ###

dic={}
n=int(input())
d=[]
for i in range(n):
  d.append(input())
mx=0
for w in d:
  dic[w]=d.count(w)
  mx=max(mx,dic[w])

for k,v in sorted(dic.items(),key=lambda x:(-x[1],x[0])):
  if mx==v:
    print(k)
    	


### FIXED CODE ###

dic={}
n=int(input())
d=[]
for i in range(n):
  d.append(input())
  if d[-1] in dic:
  	dic[d[-1]]+=1
  else:
    dic[d[-1]]=1
mx=max(dic.values())
for k,v in sorted(dic.items(),key=lambda x:(-x[1],x[0])):
  if mx==v:
    print(k)
### BUGGY CODE ###

import re
# import doctest


class IO_for_Contest(object):
    @staticmethod
    def my_input():
        # return raw_input()
        return input()

    @staticmethod
    def read_from_input():
        pass

    @staticmethod
    def read_line():
        return IO_for_Contest.my_input().strip()

    @staticmethod
    def read_int():
        return int(IO_for_Contest.my_input().strip())

    @staticmethod
    def read_n_int(n):
        return list(map(
                    int,
                    re.split('\s+', IO_for_Contest.my_input().strip())))[: n]


def solve():
    buf = IO_for_Contest.read_n_int(3)
    a = buf[0]
    b = buf[1]
    c = buf[2]
    print(min_diff(a, b, c,))


def min_diff(a, b, c):
    diff = a * b * c
    for x in range(c):
        mine = a * b * (x + 1)
        other = a * b * (c - x - 1)
        diff = min(diff, abs(mine - other))
    for x in range(b):
        mine = a * (x + 1) * c
        other = a * (b - x - 1) * c
        diff = min(diff, abs(mine - other))
    for x in range(a):
        mine = (x + 1) * b * c
        other = (a - x - 1) * b * c
        diff = min(diff, abs(mine - other))
    return diff


if __name__ == '__main__':
    # doctest.testmod()
    solve()

### FIXED CODE ###

import re
# import doctest


class IO_for_Contest(object):
    @staticmethod
    def my_input():
        # return raw_input()
        return input()

    @staticmethod
    def read_from_input():
        pass

    @staticmethod
    def read_line():
        return IO_for_Contest.my_input().strip()

    @staticmethod
    def read_int():
        return int(IO_for_Contest.my_input().strip())

    @staticmethod
    def read_n_int(n):
        return list(map(
                    int,
                    re.split('\s+', IO_for_Contest.my_input().strip())))[: n]


def solve():
    buf = IO_for_Contest.read_n_int(3)
    a = buf[0]
    b = buf[1]
    c = buf[2]
    print(min_diff(a, b, c,))


def min_diff(a, b, c):
    if a % 2 == 0 or b % 2 == 0 or c % 2 == 0:
        return 0
    diff = a * b * c
    diff = min(diff, abs(a * b * (c // 2) - a * b * (c - (c // 2))))
    diff = min(diff, abs(a * (b // 2) * c - a * (b - (b // 2)) * c))
    diff = min(diff, abs((a // 2) * b * c - (a - (a // 2)) * b * c))
    return diff

if __name__ == '__main__':
    # doctest.testmod()
    solve()
### BUGGY CODE ###

def SumofThreeIntegers():
    K, S = map(int, input().split())

    count = 0

    for x in range(K+1):
        for y in range(K+1):
            for z in range(K+1):
                if x+y+z == S and x<=K and y<=K and z<=K:
                    count += 1

    print(count)

if __name__ == "__main__":
    SumofThreeIntegers()

### FIXED CODE ###

def SumofThreeIntegers():
    K, S = map(int, input().split())

    count = 0

    for x in range(K+1):
        for y in range(K+1):
            z = S - x - y
            if 0 <= z <= S and z <= K:
                count += 1
    print(count)

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

A,B,K=map(int,input().split())
for i in range(A,B+1):
    if i-A<K or B-K<i:print(i)

### FIXED CODE ###

A,B,K=map(int,input().split())
l=[]
for i in range(A,min(A+K,B+1)):l.append(i)
for i in range(max(B-K+1,A),B+1):l.append(i)
l=sorted(list(set(l)))
for i in l:print(i)
### BUGGY CODE ###

n = input()
s = list(map(int, input().split()))

print(sum(a > b for i, b in enumerate(s) for a in s[:i]))

### FIXED CODE ###

def merge(a, left, mid, right):
    global cnt
    l = a[left:mid] + [sentinel]
    r = a[mid:right] + [sentinel]
    i = j = 0
    for k in range(left, right):
        if l[i] <= r[j]:
            a[k] = l[i]
            i += 1
        else:
            a[k] = r[j]
            j += 1
            cnt += mid - left - i


def merge_sort(a, left, right):
    if left + 1 < right:
        mid = (left + right) // 2
        merge_sort(a, left, mid)
        merge_sort(a, mid, right)
        merge(a, left, mid, right)

n = input()
a = list(map(int, input().split()))
sentinel = 10 ** 9 + 1
cnt = 0
merge_sort(a, 0, len(a))
print(cnt)
### BUGGY CODE ###

from bisect import bisect_left
n = int(input())
l = [int(i) for i in input().split()]
l.sort()
ans = 0
for i in range(n-2):
  for j in range(i+1, n-1):
    ans += bisect_left(l[j+1:], l[i]+l[j])
print(ans)


### FIXED CODE ###

from bisect import bisect_left
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(n-2):
  for j in range(i+1, n-1):
    ans += bisect_left(l, l[i]+l[j]) - j - 1
print(ans)