Harryxun/stf_run huggingface dataset:
import sys
inf = float('inf')
N = int(input())
d = [list(map(int, input().split())) for _ in range(N)]
edges = []
for i in range(N):
    for j in range(i+1, N):
        edges.append((A[i][j], i, j))
edges.sort()
for i in range(N):
    d[i][i] = 0
ans=0
for a in range(N):
    for b in range(N):
        flag = True
        for i in range(N):
            if i == a or i == b:
                continue
            if d[a][i]+d[i][b]<d[a][b]:
                print(-1)
                sys.exit()
            if d[a][i]+d[i][b]==d[a][b]:
                flag = False
                break
        if flag:
            ans+=d[a][b]
            
print(ans//2)
    






### FIXED CODE ###

import sys
inf = float('inf')
N = int(input())
d = [list(map(int, input().split())) for _ in range(N)]
for i in range(N):
    d[i][i] = 0
ans=0
for a in range(N):
    for b in range(N):
        flag = True
        for i in range(N):
            if i == a or i == b:
                continue
            if d[a][i]+d[i][b]<d[a][b]:
                print(-1)
                sys.exit()
            if d[a][i]+d[i][b]==d[a][b]:
                flag = False
                break
        if flag:
            ans+=d[a][b]
            
print(ans//2)
h,w=map(int,input().split())
a=[[i for i in input().split()] for j in range(h)]
p=[chr(i) for i in range(65,75)]
for r in range(h):
    for c in range(w):
        if a[r][c]=="snuke":
            print(p[c]+str(r+1))
            break

### FIXED CODE ###

h,w=map(int,input().split())
a=[[i for i in input().split()] for j in range(h)]
p=[chr(i) for i in range(65,91)]
for r in range(h):
    for c in range(w):
        if a[r][c]=="snuke":
            print(p[c]+str(r+1))
            break
a, b, c = [int(i) for i in input().split()]

d = a // b
r = a % b
f = a / b

print("{0} {1} {2:.5f}".format(d, r, f))

### FIXED CODE ###

a, b, = [int(i) for i in input().split()]

d = a // b
r = a % b
f = a / b

print("{0} {1} {2:.5f}".format(d, r, f))
x,a,b=map(int,input()/split())
if b>=a:
    print('delicious')
elif a-b<=x:
    print('safe')
else:
    print('dangerous')


### FIXED CODE ###

x,a,b=map(int,input().split())
if a>=b:
    print('delicious')
elif (b-a)<=x:
    print('safe')
else:
    print('dangerous')
r = input()
if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")
  

### FIXED CODE ###

r = int(input())
if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")
s = str
End = False
S = input()
A,B,C,D = int(S[0]),int(S[1]),int(S[2]),int(S[3])
for i in [B,-1*B]:
    for j in [C,-1*C]:
        for k in [D,-1*D]:
            if A + i + j + k == 7:
                print(f"{A:d}{i:+d}{j:+d}{k:+d}=7")
                End = True
                break
        if End:
            break
    if End:
        break


### FIXED CODE ###

S = input()
A,B,C,D = int(S[0]),int(S[1]),int(S[2]),int(S[3])
for i in [B,-1*B]:
    for j in [C,-1*C]:
        for k in [D,-1*D]:
            if A + i + j + k == 7:
                print("{:d}{:+d}{:+d}{:+d}=7".format(A,i,j,k),end="")
                exit()
n = int(input())
a = list(map(int,input().split()))

cnt = [0] * 40
for x in a:
    if cnt[x] != 0: 
        cnt[x] = 2
    else: 
        for i in range(x,40,x):
            cnt[i] += 1

ans = 0
for x in a:
    if cnt[x] == 1:
        ans += 1
        
print(ans)

### FIXED CODE ###

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

cnt = [0] * 1000005
for x in a:
    if cnt[x] != 0: 
        cnt[x] = 2
    else: 
        for i in range(x,1000005,x):
            cnt[i] += 1

ans = 0
for x in a:
    if cnt[x] == 1:
        ans += 1

print(ans)
import fractions


def calc(x1, y1, x2, y2):
    return 2 * (x2 - x1), 2 * (y2 - y1), x2 ** 2 + y2 ** 2 - x1 ** 2 - y1 ** 2


n = int(input())
for _ in range(n):
    x1, y1, x2, y2, x3, y3 = map(float, input().split())
    cx1, cy1, z1 = calc(x1, y1, x2, y2)
    cx2, cy2, z2 = calc(x1, y1, x3, y3)
    gcd = fractions.gcd(cx1, cx2)
    r1, r2 = cx2 // gcd, cx1 // gcd
    dcy = r1 * cy1 - r2 * cy2
    dz = r1 * z1 - r2 * z2
    y = dz / dcy
    x = (z1 - cy1 * y) / cx1
    r = ((x - x1) ** 2 + (y - y1) ** 2) ** 0.5
    print(*map(lambda x: '{:.3f}'.format(round(x, 3)), (x, y, r)))

### FIXED CODE ###

def calc(x1, y1, x2, y2):
    return 2 * (x2 - x1), 2 * (y2 - y1), x2 ** 2 + y2 ** 2 - x1 ** 2 - y1 ** 2


n = int(input())
for _ in range(n):
    x1, y1, x2, y2, x3, y3 = map(float, input().split())
    cx1, cy1, z1 = calc(x1, y1, x2, y2)
    cx2, cy2, z2 = calc(x1, y1, x3, y3)
    dcy, dz = cx2 * cy1 - cx1 * cy2, cx2 * z1 - cx1 * z2
    y = dz / dcy
    x = (z1 - cy1 * y) / cx1 if cx1 else (z2 - cy2 * y) / cx2
    r = ((x - x1) ** 2 + (y - y1) ** 2) ** 0.5
    print('{:.3f} {:.3f} {:.3f}'.format(x, y, r))
h,w=map(int,input().split())
 
if w%2==0:
  if h==1:
    print(1)
  elif:
    print((w//2)*h)
elif w==1:
  print(1)
elif w%2!=0:
  if h%2==0:
    print(w*(h//2))
  else:
    print(w*((h-1)//2)+(w+1)//2)


### FIXED CODE ###

h,w=map(int,input().split())
 
if w%2==0:
  if h==1:
    print(1)
  else:
    print((w//2)*h)
elif w==1:
  print(1)
elif w%2!=0:
  if h%2==0:
    print(w*(h//2))
  else:
    print(w*((h-1)//2)+(w+1)//2)
s = input()
if s[5] = "1":
  print("TBD")
elif int(s[6]) >= 5:
  print("TBD")
else:
  print("Heisei")

### FIXED CODE ###

s = input()
if s[5] == "1":
  print("TBD")
elif int(s[6]) >= 5:
  print("TBD")
else:
  print("Heisei")
k,s = map(int,input().split())
for i in range(k):
  for j in range(k):
    if 0<=(s-k-j)<=k:
      count+=1
print(count)

### FIXED CODE ###

count=0
k,s = map(int,input().split())
for i in range(k+1):
  for j in range(k+1):
    if 0<=(s-i-j)<=k:
      count+=1
print(count)
_,l=map(int,open(0).read().split())
l.sort()
print("YNeos"[sum(l[:-1])<=l[-1]::2])

### FIXED CODE ###

_,*l=map(int,open(0).read().split())
l.sort()
print("YNeos"[sum(l[:-1])<=l[-1]::2])
n = int(input())
K = int(input())
x = int(input())
y = int(input())

if n-k > 0:
    ans = x*k + y+(n-k)
    print(ans)
else:
    ans = x*n
    print(ans)

### FIXED CODE ###

n = int(input())
k = int(input())
x = int(input())
y = int(input())

if n-k > 0:
    ans = x*k + y*(n-k)
    print(ans)
else:
    ans = x*n
    print(ans)
a = int(input())
b = int(input())

print(a*b, 2*(a+b) )


### FIXED CODE ###

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

print( a*b, 2*(a+b) )
S=int(input())
K=int(input())
a=[]
while S !=0:
  s=S%10
  a.append(s)
  S //=10
m=0
for i in range(1,len(a)+1):
  m += a[-i]*5000000000000000
  if m>=K:
    ans=i
    break
print(a[-ans])

### FIXED CODE ###

S=int(input())
K=int(input())

a=[]
while S !=0:
  s=S%10
  a.append(s)
  S //=10
m=0

for i in range(1,len(a)+1):
  if a[-i]!=1:
    if i>K:
      ans=1
    else:
      ans=i
    break
  else:
    ans=1

print(a[-ans])
H, W = map(int, input().split())
N = int(input())
A = list(map(int, input().split()))

x = 0
for i in range(H):
    ans = []
    for j in range(W):
        ans.append(x+1)
        A[i] -= 1
        if A[i] == 0:
            x += 1
    if i % 2 == 0:
        print(*ans)
    else:
        print(*ans[::-1])

### FIXED CODE ###

H, W = map(int, input().split())
N = int(input())
A = list(map(int, input().split()))

x = 0
for i in range(H):
    ans = []
    for j in range(W):
        ans.append(x+1)
        A[x] -= 1
        if A[x] == 0:
            x += 1
    if i % 2 == 0:
        print(*ans)
    else:
        print(*ans[::-1])
a, b = int(input().split())

if a > b:
    print('a > b')

if a < b:
    print('a < b')

if a == b:
    print('a == b')



### FIXED CODE ###

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

if a > b:
    print('a > b')
elif a < b:
    print('a < b')
else:
    print('a == b')
n = int(input())
s = input()
n1 = []
for i in range(n):
    s1 = set()
    for j in range(i):
        for k in range(i+1, n):
            # print(i, j, k, s[j], s[k])
            if s[j] == s[k] and set(s[j]).issubset(s1) is False:
                s1.add(s[j])
            # print('len', len(s1))
    n1.append(len(s1))
print(max(n1))


### FIXED CODE ###

a, b = map(int, input().split())
lis = [a+b, a-b, a*b]
print(max(lis))
X,Y=input().split();print("=><"[X>Y |-(X<Y)])

### FIXED CODE ###

a,b=input().split();print([[">","="][ord(a)==ord(b)],"<"][ord(a)<ord(b)])
from math import log2
L=int(input())
ans=[]
i=1
while True:
    if 2**i>L:
        last=i
        break
    ans.append([i,i+1,2**(i-1)])
    ans.append([i,i+1,0])
    i+=1
"""for i in ans:
    print(i)
print(last)"""
num=2**(last-1)
a=L-num
while a>0:
    ans.append([int(log2(a))+1,last,num])
    num+=2**(int(log2(a)))
    a=L-num
for i in ans:
    print(i)


### FIXED CODE ###

from math import log2
L=int(input())
ans=[]
i=1
while True:
    if 2**i>L:
        last=i
        break
    ans.append([i,i+1,2**(i-1)])
    ans.append([i,i+1,0])
    i+=1
"""for i in ans:
    print(i)
print(last)"""
num=2**(last-1)
a=L-num
while a>0:
    ans.append([int(log2(a))+1,last,num])
    num+=2**(int(log2(a)))
    a=L-num
print(last,len(ans))
for i in ans:
    print(*i)
N = int(input())
arr = map(int, input().split(' '))
ans = [0 for x in range(N)]
for i in reversed(range(N)):
  n = i + 1
  s = 0
  for k in reversed(range(1, N // n)):
	index = n*(k+1) - 1
	s += arr[index]
  if s % 2 == arr[i]:
     ans[i] = 0
  else:
     ans[i] = 1
    	
ans_arr = []
for i in ans:
  if i == 1:
    ans_arr.append(i)

print(sum(ans))
print(' '.join(ans_arr))


### FIXED CODE ###

def main():
    n = int(input())
    A = [0] + list(map(int, input().rstrip().split()))
    for i in range(n // 2, 0, -1):  # second half: no multiples
        A[i] = sum(A[i::i]) % 2
    ans = [i for i, j in enumerate(A) if j]
    print(len(ans))  # all cells: [1] -> len() (much faster than sum())
    print(*ans)


if __name__ == "__main__":
    main()
import math
A, B = map(int, input().split())
ans = math.ceil((A-1)/(B-1))
print(ans)

### FIXED CODE ###

A, B = map(int, input().split())
ans = 0
tap = 0
for i in range(10000):
    if B == 1:
        break
    if i == 0:
        tap += A
        ans += 1
    if i >= 1:
        tap -= 1
        tap += A
        ans += 1
    if tap >= B:
        break
print(ans)
n = int(input())
n = int(input())
ans = 0
for i in range(1,n+1):
    k = n//i
    m = k*(k+1)//2
    ans += m*i
print(ans)

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1,n+1):
    k = n//i
    m = k*(k+1)//2
    ans += m*i
print(ans)
import math

def prime_factorize(n):
    ret = []
    while n % 2 == 0:
        ret.append(2)
        n //= 2
    div = 3
    while div <= math.sqrt(n):
        if n % div == 0:
            ret.append(div)
            n //= div
        else:
            div += 2
    if n != 1:
        ret.append(n)
    return ret


if __name__ == '__main__':
    A, B = map(int, input().split())
    gcd = math.gcd(A, B)
    if gcd == 1:
        print(1)
        exit()
    facts = prime_factorize(gcd)
    print(len(facts) + 1)

### FIXED CODE ###

import math
import fractions
gcd = math.gcd if hasattr(math, "gcd") else fractions.gcd

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

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct

g = gcd(A, B)

print(len(set(factorize(g)))+1)
c = str(input()))
if (c=="a" or c=="i" or c=="u" or c=="e" or c=="o"):
  print("vowel")
else:
  print("consonant")

### FIXED CODE ###

c = str(input())
if (c=="a" or c=="i" or c=="u" or c=="e" or c=="o"):
  print("vowel")
else:
  print("consonant")
from collections import Counter
N, M = map(int, input().split())
groups = [0] * (N + 1)
group_num_list = [[0]]
group_num = 1
for _ in range(M):
    A, B = map(int, input().split())
    if groups[A] != 0 and groups[B] != 0:
        if groups[A] != groups[B]:
            lower = min(groups[A], groups[B])
            higher = max(groups[A], groups[B])
            for i in group_num_list[higher]:
                groups[i] = lower
            tmp = group_num_list[higher]
            group_num_list[lower].extend(tmp)
            # del group_num_list[higher]
    elif groups[A] != 0:
        groups[B] = groups[A]
        group_num_list[groups[A]].append(B)
    elif groups[B] != 0:
        groups[A] = groups[B]
        group_num_list[groups[B]].append(A)
    else:
        groups[A] = group_num
        groups[B] = group_num
        group_num_list.append([A, B])
        group_num += 1
counter = Counter(groups)
# print(collection)
# print(group_num_list)
if counter.most_common()[0][0] != 0:
    print(counter.most_common()[0][1])
else:
    print(counter.most_common()[1][1])


### FIXED CODE ###

from collections import Counter
N, M = map(int, input().split())
groups = [0] * (N + 1)
group_num_list = [[0]]
group_num = 1
for _ in range(M):
    A, B = map(int, input().split())
    if groups[A] != 0 and groups[B] != 0:
        if groups[A] != groups[B]:
            lower = min(groups[A], groups[B])
            higher = max(groups[A], groups[B])
            for i in group_num_list[higher]:
                groups[i] = lower
            tmp = group_num_list[higher]
            group_num_list[lower].extend(tmp)
            # del group_num_list[higher]
    elif groups[A] != 0:
        groups[B] = groups[A]
        group_num_list[groups[A]].append(int(B))
    elif groups[B] != 0:
        groups[A] = groups[B]
        group_num_list[groups[B]].append(int(A))
    else:
        groups[A] = group_num
        groups[B] = group_num
        group_num_list.append([int(A), int(B)])
        group_num += 1
counter = Counter(groups)
# print(collection)
# print(group_num_list)
if len(group_num_list) == 1:
    print(1)
elif int(counter.most_common()[0][0]) != 0:
    print(counter.most_common()[0][1])
else:
    print(counter.most_common()[1][1])
#! /usr/bin/python
n = int(input())
w = list(map(int, stdin.read().splitlines()))
print("Yes" if n == len(set(w)) else "No")


### FIXED CODE ###

#! /usr/bin/python
from sys import stdin
n = int(input())
W = stdin.read().splitlines()
if n != len(set(W)):
    print("No")
    exit()
for i in range(n-1):
    if W[i][-1] != W[i+1][0]:
        print("No")
        exit()
print("Yes")
n = int(input())
lst = map(int,input().split())
ans = 0
for i in range(n):
    for j in range(1,n):
        ans += ans + lst[i]*lst[j]

print(ans)

### FIXED CODE ###

n = int(input())
lst = list(map(int,input().split()))
ans = 0
for i in range(n):
    for j in range(i+1,n):
        ans = ans + lst[i]*lst[j]

print(ans)
N = int(input())
cards = map(int, input().split()).sort(reverse=True)
A, B = sum(cards[0::2]), sum(cards[1::2])
print(str(A-B))



### FIXED CODE ###

N = int(input())
cards = sorted(map(int, input().split()), reverse=True)
A, B = sum(cards[0::2]), sum(cards[1::2])
print(str(A-B))
n = int(input())
l = list(map(str,input()))

ans = 0
for i in range(n):
    a = l[0:i]
    b = l[i:n-1]
    tmp = []
    for j in a:
        if j in b:
            tmp.append(j)
    tmp = set(tmp)
    ans = (max(ans,len(tmp)))

print(ans)

### FIXED CODE ###

a,b = map(int,input().split())
t = a+b
h = a-b
k = a*b
print(max(t,h,k))
def main():
    a, b = input().split()
    a = int(a)
    b = int(float(b) * 100)
    ans = str(a * b)
    ans = int(ans[:-2])
    print(ans)



if __name__ == "__main__":
    main()


### FIXED CODE ###

from decimal import *

def main():
    a, b = input().split()
    a = Decimal(a)
    b = Decimal(b)
    print(int(a * b))





if __name__ == "__main__":
    main()
n = int(input())
data = sorted(list(map(int, input.split())), reverse=True)
a = sum(data[::2])
b = sum(data[1::2])
print(a - b)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = a.sort(reverse = True)
print(sum(a[::2])-sum(a[1::2]))
N = int(input())
F = [[] for TF in range(0,N)]
for TF in range(0,N):
    F[TF] = [int(T) for T in input().split()]
P = [[] for TP in range(0,N)]
for TP in range(0,N):
    P[TP] = [int(T) for T in input().split()]
    
MAXB = -10**9
for TB in range(1,2**10):
    BaseConv,BaseSInd = ForBaseConvert(TB,10,2)
    Benefit = 0
    for TN in range(0,N):        
        Count = sum(1 if F[TN][TT]==1 else 0 for TT in BaseSInd[1])
        Benefit += P[TN][Count]
    if MAXB<Benefit:
        MAXB = Benefit
print(MAXB)

### FIXED CODE ###

def ForBaseConvert(Roop,MaxD,Base):
    if all(type(TT) is int for TT in [Roop,MaxD,Base]):
        if Base>=2 and MaxD>=1:
            ConvertN = []
            while Roop>0:
                ConvertN.append(Roop%Base)
                Roop = Roop//Base

            BaseConv = [0]*(MaxD-len(ConvertN))+ConvertN[::-1]
            BaseSInd = [[] for TB in range(0,Base)]
            for TB in range(0,Base):
                BaseSInd[TB] = [SInd for SInd,SNum in enumerate(BaseConv) if SNum==TB]
            return BaseConv,BaseSInd
        else:
            return []
    else:
        return []
      
N = int(input())
F = [[] for TF in range(0,N)]
for TF in range(0,N):
    F[TF] = [int(T) for T in input().split()]
P = [[] for TP in range(0,N)]
for TP in range(0,N):
    P[TP] = [int(T) for T in input().split()]
    
MAXB = -10**9
for TB in range(1,2**10):
    BaseConv,BaseSInd = ForBaseConvert(TB,10,2)
    Benefit = 0
    for TN in range(0,N):        
        Count = sum(1 if F[TN][TT]==1 else 0 for TT in BaseSInd[1])
        Benefit += P[TN][Count]
    if MAXB<Benefit:
        MAXB = Benefit
print(MAXB)
num = int(input())
flag = True
for _ in range(2,10):
  if num % _ == 0:
    print("YES")
	flag = False
if flag:
  print("NO")

### FIXED CODE ###

num = int(input())
Flag = False
for x in range(1,10):
  for y in range(x,10):
    if x * y == num:
      Flag = True
      break
    if Flag == True:
      break

if Flag:
  print("Yes")
else:
  print("No")
import itertools
N = int(input())
s = []
for i in range(N):
    s.append(int(input()))

sei=0
s = sorted(s)
total = sum(s)
flg=0

if total%10!=0:
    out=total
    flg=1
else:
    scr=total
    for i in range(N):
        if S[i] %10!=0:
            print(sum(S)-S[i])
            break
        elif i==N-1:
            print(0)
            break


### FIXED CODE ###


N = int(input())
s = []
for i in range(N):
    s.append(int(input()))

s = sorted(s)
total = sum(s)

if total%10!=0:
    out=total
    print(out)
else:
    scr=total
    for i in range(N):
        if s[i] %10!=0:
            print(sum(s)-s[i])
            break
        elif i==N-1:
            print(0)
            break
arr = list(input())
down = list()
areas = list()
 
for i, el in enumerate(arr):
    if el == "\\":
        down.append(i)
    elif el == "/" and not len(down) == 0:
        start_ind = down.pop()
        area = i - start_ind
        while len(areas) > 0 and areas[-1][0] > start_ind:
            area += areas.pop()[1]
        areas.append((start_ind, area))
 
areas = [areas[i][1] for i in range(len(areas))]
print(sum(areas))
if len(areas) == 0:
    print("0")
else:
    print(len(areas), " ".join(map(str,areas)))


### FIXED CODE ###

arr = list(input())
down = list()
areas = list()

for i, el in enumerate(arr):
    if el == "\\":
        down.append(i)
    elif el == "/" and not len(down) == 0:
        start_ind = down.pop()
        area = i - start_ind
        while len(areas) > 0 and areas[-1][0] > start_ind:
            area += areas.pop()[1]
        areas.append((start_ind, area))

areas = [areas[i][1] for i in range(len(areas))]
print(sum(areas))
print(str(len(areas)) + " " + " ".join(map(str,areas)) if not len(areas) == 0  else "0")
import collections
N, M = map(int, input().split())
X = list(map(int, input().split()))

table = collections.defaultdict(list)
for x in X:
    table[x % M].append(x)
Count = [None]*N
for i in range(M):
    table[i].sort(key=lambda x: table[x].count(x), reverse=True)
    Count[i] = collections.Counter(table[i]).values()
ans = 0
for i in range(M // 2):
    tmp = min(len(table[i]), len(table[(M-i) % M]))
    ans += tmp
    k = 0
    l = 0
    for x in Count[i]:
        k += x % 2
        l += x // 2
    if tmp <= k:
        ans += l
    else:
        ans += ((k + l*2) - tmp) // 2

    if i != (M-i) % M:
        k = 0
        l = 0
        for x in Count[(M-i) % M]:
            k += x % 2
            l += x // 2
        if tmp <= k:
            ans += l
        else:
            ans += ((k + l*2) - tmp) // 2
print(ans)


### FIXED CODE ###

import collections
N, M = map(int, input().split())
X = list(map(int, input().split()))

table = collections.defaultdict(list)
for x in X:
    table[x % M].append(x)
Count = [None]*M
for i in range(M):
    Count[i] = collections.Counter(table[i]).values()
ans = 0
for i in range(M // 2 + 1):
    tmp = min(len(table[i]), len(table[(M-i) % M]))
    if i != (M-i) % M:
        ans += tmp
    else:
        ans += tmp // 2

    k = 0
    l = 0
    for x in Count[i]:
        k += x % 2
        l += x // 2
    if tmp <= k:
        ans += l
    else:
        ans += ((k + l*2) - tmp) // 2

    if i != (M-i) % M:
        k = 0
        l = 0
        for x in Count[(M-i) % M]:
            k += x % 2
            l += x // 2
        if tmp <= k:
            ans += l
        else:
            ans += ((k + l*2) - tmp) // 2

print(ans)
import math

a, b = map(int, input().split())  # 複数数値入力

A = list()
B = list()

if b == 0:
    B = [0]
elif b == 1:
    B = [0]
for i in range(1, int(math.log2(b))+2):
    tmp = b // (2 ** i) * 2 ** (i - 1)

    if b % (2 ** i) < (2 ** (i-1)):
        plus = 0
    else:
        plus = b % (2 ** i) - 2 ** (i-1) + 1

    B.append(tmp+plus)
if a == 0:
    A = [0]
elif a == 1:
    A = [0]
else:
    for i in range(1, int(math.log2(a-1))+2):
        tmp = (a-1) // (2 ** i) * 2 ** (i - 1)

        if (a-1) % (2 ** i) < (2 ** (i-1)):
            plus = 0
        else:
            plus = (a-1) % (2 ** i) - 2 ** (i-1) + 1

        A.append(tmp + plus)

print(A)
print(B)
ans = 0
for i in range(0, int(math.log2(b)) + 1):
    print(i)
    if i >= len(A):
        ans += (B[i]) % 2 * 10 ** i
    else:
        ans += (B[i] - A[i]) % 2 * 10 ** i

print(int(str(ans), 2))


### FIXED CODE ###

import math

a, b = map(int, input().split())  # 複数数値入力

A = list()
B = list()

if b == 0:
    B = [0]
elif b == 1:
    B = [1]
else:
    for i in range(1, int(math.log2(b))+2):
        tmp = b // (2 ** i) * 2 ** (i - 1)

        if b % (2 ** i) < (2 ** (i-1)):
            plus = 0
        else:
            plus = b % (2 ** i) - 2 ** (i-1) + 1

        B.append(tmp + plus)

if a == 0:
    A = [0]
elif a == 1:
    A = [0]
else:
    for i in range(1, int(math.log2(a-1))+2):
        tmp = (a-1) // (2 ** i) * 2 ** (i - 1)

        if (a-1) % (2 ** i) < (2 ** (i-1)):
            plus = 0
        else:
            plus = (a-1) % (2 ** i) - 2 ** (i-1) + 1

        A.append(tmp + plus)

if b == 0:
    print(0)
else:
    ans = 0
    for i in range(0, int(math.log2(b)) + 1):
        if i >= len(A):
            ans += (B[i]) % 2 * 10 ** i
        else:
            ans += (B[i] - A[i]) % 2 * 10 ** i

    print(int(str(ans), 2))
S = int(input())
W = int(input())

if W >= S:
 print('unsafe')
else:
 print('safe')

### FIXED CODE ###

S = list(map(int,input().split()))
 
if S[1] >= S[0]:
 print('unsafe')
else:
 print('safe')
s=input()
n=len(s)

def kaibun(string):
  index = 0
  ans = True
  while i < n-1-i:
    if s[i] != s[n-1-i]:
      ans = False
      return ans
      break
    index += 1
  return ans

ans_total = def(s)

zenhan = s[:n//2]
kouhan = s[n//2:]

ans_zen = def(zenhan)
ans_kou = def(kouhan)

if ans_total == True and ans_zen == True and ans_kou == True:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

s = input()
n = len(s)
zen = s[:n // 2]

kou= s[n // 2 + 1:]

s_rev = s[::-1]

zen_rev = zen[::-1]
kou_rev = kou[::-1]

if s == s_rev and zen == zen_rev and kou == kou_rev:
  print('Yes')
else:
  print('No')
K, X=map(int,input().split())
print(x, for x in range(X-K+1,X+K))


### FIXED CODE ###

K, X=map(int,input().split())
x=X-K+1
while x<=X+K-1:
  print(x)
  x+=1