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

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

class BIT():
    def __init__(self, max_n):
        self.size = max_n + 1
        self.tree = [0] * self.size

    def get_sum(self,i):
        s = 0
        while i:
            s += self.tree[i]
            i -= i & -i
        return s

    def add(self, i, x):
        while i < self.size:
            self.tree[i] += x
            i += i & -i

n,q = map(int,readline().split())
c = list(map(int,readline().split()))
lr = list(map(int,read().split()))
it = iter(lr)
lr2 = []
for i,l,r in zip(range(q),it,it):
    lr2.append((r-1,l-1,i))

lr2.sort()
st = BIT(n+1)
ans = [0] * q
before = [-1] * (n+1)
c_ind = 0
for r,l,i in lr2:
    while(c_ind <= r):
        bef = before[c[c_ind]]
        if(bef!=-1):
            st.add(bef+1,-1)
        before[c[c_ind]] = c_ind
        c_ind += 1

    ans[i] = r-l+1 + st.get_sum(r+1) - st.get_sum(l)

print('\n'.join(map(str,ans)))

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

class Seg_sum():
    def __init__(self,x):
        #####単位元######
        self.ide_ele_min = 0
        self.func = lambda a,b : a+b

        self.n = len(x)

        #num_max:n以上の最小の2のべき乗
        self.num_max =2**(self.n-1).bit_length()
        self.x = [self.ide_ele_min]*2*self.num_max

        for i,num in enumerate(x, self.num_max):
            self.x[i] = num
        for i in range(self.num_max-1,0,-1):
            self.x[i] = self.func(self.x[i<<1],self.x[(i<<1) + 1])

    def update(self,i,x):
        i += self.num_max
        self.x[i] = x
        while(i>0):
            i = i//2
            self.x[i] = self.func(self.x[i<<1],self.x[(i<<1) + 1])

    def query(self,i,j):
        res = self.ide_ele_min
        if i>=j:
            return res
        i += self.num_max
        j += self.num_max -1
        while(i<=j):
            if(i==j):
                res = self.func(res,self.x[i])
                break
            if(i&1):
                res = self.func(res,self.x[i])
                i += 1
            if(not j&1):
                res = self.func(res,self.x[j])
                j -= 1
            i = i>>1
            j = j>>1
        return res

n,q = map(int,readline().split())
c = tuple(map(int,readline().split()))
lr = tuple(map(int,read().split()))
it = iter(lr)
lrq = [[] for _ in range(n)]
for i,l,r in zip(range(q),it,it):
    lrq[r-1].append((l-1,i))

st = Seg_sum([1]*(n+1))
ans = [0] * q
before = [-1] * (n+1)
c_ind = 0
for r in range(n):
    for l,i in lrq[r]:
        while(c_ind <= r):
            bef = before[c[c_ind]]
            if(bef!=-1):
                st.update(bef,0)
            before[c[c_ind]] = c_ind
            c_ind += 1

        ans[i] = st.query(l,r+1)

print('\n'.join(map(str,ans)))
### BUGGY CODE ###

from collections import defaultdict
N = int(input())
raw_number = list(map(int, input().split()))
numbers = defaultdict(int)

for num in raw_number:
    numbers[num] += 1
    
Q = int(input())

for _ in range(Q):
    a, b = list(map(int, input().split()))
    numbers[b] += numbers[a]
    numbers[a] = 0
    print(sum([v*k for (k, v) in numbers.items()]))

### FIXED CODE ###

class Counter(dict):
    def __missing__(self, i):
        return 0

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

total = sum(a)

bucket = Counter()

for item in a:
    bucket[item] += 1

for i in range(q):
    b, c = map(int, input().split())
    taken = bucket[b]
    total -= bucket[b]*b
    bucket[c] += bucket[b]
    bucket[b] = 0
    total += taken*c
    print(total)
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10 ** 6)

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

for _ in range(m):
    a, b = map(int, input().split())
    e[a-1].append(b-1)

c = [0] * n
def search_path(p, temp):
    c[p] = 1
    for x in e[p]:
        if x in temp:
            ans = [] + temp[temp.index(x):]
            check = 1
            while check == 1:
                check = 0
                #print(ans)
                for i in range(len(ans)-1):
                    for z in e[ans[i]]:
                        if z == ans[i+1]:
                            continue
                        elif z in ans:
                            t = ans.index(z)
                            if t < i:
                                ans = [] + ans[t:i+1]
                            else:
                                ans = [] + ans[i:t+1]
                            #print(ans, z)
                            check = 1
                            break
                    if check == 1:
                        break
                if check == 1:
                    continue
                for z in e[ans[-1]]:
                    if z == ans[0]:
                        continue
                    elif z in ans:
                        ans = [] + ans[ans.index(z):]
                        check = 1
                        #print(z, ans)
                        break
            print(len(ans))
            for z in ans:
                print(z+1)
            exit()
        else:
            search_path(x, temp + [x])


t = 1
for i in range(n):
    if c[i] == 0:
        ans = search_path(i, [i])

print(-1)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)

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

for _ in range(m):
    a, b = map(int, input().split())
    e[a-1].append(b-1)

c = [0] * n
ans = []
def search_path(p, temp):
    c[p] = 1
    for x in e[p]:
        if x in temp:
            print(-99999)
            exit()
        else:
            search_path(x, temp + [x])


t = 1
for i in range(n):
    if c[i] == 0:
        ans = search_path(i, [i])

print(-1)
### BUGGY CODE ###

from queue import *
from sys import stdin
input = stdin.readline

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

weight = [0] * n
for i in range(q):
    p, x = map(int, input().split())
    weight[p-1] += x

unused = [1]*n
que = Queue()
que.put(0)
while que.qsize():
    m = que.get()
    unused[m] = 0
    for v in link[m]:
        if unused[v]:
            weight[v] += weight[m]
            que.put(v)
print(*weight)

### 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 numpy as np

n = int(input())
s = [list(input()) for _ in range(n)]

def check(a):
    t = np.array(s[a:] + s[:a])
    t_t = t.T
    
    return (t == t_t).all()

ans = [check(a) for a in range(n)]
print(ans.count(True) * n)

### FIXED CODE ###

n = int(input())
s = [list(input()) for _ in range(n)]

def check(a):
    t = s[a:] + s[:a]
    t_t = list(map(list, zip(*t)))
    
    return t == t_t

ans = [check(a) for a in range(n)]
print(ans.count(True) * n)
### BUGGY CODE ###

N=int(input())
A=[int(i) for i in input().split(" ")]
memo=[]
for a in A:
    if a in memo:
        print("NO")
        break
    else:
        memo+=[a]
else:
    print("YES")


### FIXED CODE ###

N=int(input())
A=[int(i) for i in input().split(" ")]
memo={}
for a in A:
    if a in memo:
        print("NO")
        break
    else:
        memo[a]=1
else:
    print("YES")
### BUGGY CODE ###

N=int(input())
A=list(map(int,input().split()))
ans=0
for i in range(N-1):
    for j in range(i+1,N):
        ans+=A[i]*A[j]
ans=ans%(10**9+7)
print(ans)


### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
ans=0
s=sum(A)
for i in range(N-1):
    s-=A[i]
    ans+=(A[i]*(s))%(10**9+7)
print(ans%(10**9+7))
### BUGGY CODE ###

n, m = (int(i) for i in input().split())
a = [int(i) for i in input().split()]
for _ in range(m):
    idx = a.index(max(a))
    a[idx] //= 2
print(sum(a))

### FIXED CODE ###

import heapq as hp
n, m = (int(x) for x in input().split())
a = [int(x)*(-1) for x in input().split()]
hp.heapify(a)
for _ in range(m):
    min = hp.heappop(a)
    hp.heappush(a, (-1)*(-min//2))
print(-sum(a))
### BUGGY CODE ###

import sys

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

alr = []
now = 1
i = 0
while not now in alr:
    alr.append(now)
    now = A[now-1]
    i += 1
    if i == K:
        print(now)
        sys.exit()

place = alr.index(now)
circle = len(alr) - place
rem = (K - place) % circle
print(alr[place + rem])

### FIXED CODE ###

import sys

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

alr = {}
now = 1
i = 0
while not now in alr.keys():
    alr[now] = i
    now = A[now-1]
    i += 1
    if i == K:
        print(now)
        sys.exit()

place = alr[now]
circle = len(alr) - place
rem = (K - place) % circle
for k, v in alr.items():
    if v == place + rem:
        print(k)
        break
### BUGGY CODE ###

N = int(input())
a = list(map(int,input().split()))
I = 0
J = 0
K = 0
for i in range(N):
    if a[i] == 3:
        I += 1
    elif a[i] == 2:
        J += 1
    elif a[i] == 1:
        K += 1

dp = [[[-1 for i in range(N+1)] for i in range(N+1)] for i in range(N+1)]
dp[0][0][0] = 0

def cal(i,j,k):
    if dp[i][j][k] != -1:
        return dp[i][j][k]
    else:
        res = 0
        if i != 0:
            res += i*cal(i-1,j+1,k)
        if j != 0:
            res += j*cal(i,j-1,k+1)
        if k != 0:
            res += k*cal(i,j,k-1)
        res += N
        res /= i+j+k
        dp[i][j][k] = res
        return res

print(cal(I,J,K))

### FIXED CODE ###

N = int(input())
a = list(map(int,input().split()))
I = 0
J = 0
K = 0
for i in range(N):
    if a[i] == 1:
        I += 1
    if a[i] == 2:
        J += 1
    if a[i] == 3:
        K += 1

dp = [[[0.0]*(N+2) for _ in range(N+2)] for _ in range(N+2)]
for k in range(K+1):
    for j in range(J+K+1):
        if j+k > N:
            break
        for i in range(N+1):
            S = i+j+k
            if S > N:
                break
            if S == 0:
                continue
            dp[i][j][k] = (i*dp[i-1][j][k]+j*dp[i+1][j-1][k]+k*dp[i][j+1][k-1]+N)/S
print(dp[I][J][K])
### BUGGY CODE ###

s = input()
while 1:
    i = s.find('ST')
    if i > -1:
        cnt = 0
        for j in range(min(i, len(s)-2-i)):
            if s[i-j-1] == 'S' and s[i+j+2] == 'T':
                cnt += 1
            else:
                break
        s = s[:i-cnt] + s[i+cnt+2:]
    else:
        break
print(len(s))

### FIXED CODE ###

s = input()
cnt = 0
while cnt < 100000:
    n = len(s)
    s = ''.join(s.split('ST'))
    if len(s) != n:
        cnt += (len(s) - n) // 2
    else:
        break
    i = s.find('ST')
    
    stlen = 0
    if i > 0:
        for j in range(min(i, len(s)-2-i)):
            if s[i-j-1] == 'S' and s[i+j+2] == 'T':
                stlen += 1
            else:
                break
        s = s[:i-stlen] + s[i+stlen+2:]
        cnt += 1 + stlen
print(len(s))
### BUGGY CODE ###

n,w = map(int,input().split())
wv = [ list(map(int,input().split())) for _ in range(n) ]

dp = [ [0]*(w+1) for _ in range(n) ]

for j in range(w+1):
    if (j-wv[0][0])>=0:
        dp[0][j] = wv[0][1]
    else:
        dp[0][j] = 0

for i in range(1,n):
    for j in range(w+1):
        if (j-wv[i][0])>=0:
            dp[i][j] = max(dp[i-1][j], dp[i-1][j-wv[i][0]]+wv[i][1])
        else:
            dp[i][j] = dp[i-1][j]

ans = dp[n-1][w]

print(ans)

### FIXED CODE ###

n,w = map(int,input().split())
wv = [ list(map(int,input().split())) for _ in range(n) ]

dp = [ [0]*(w+1) for _ in range(n) ]

for j in range(w+1):
    if (j-wv[0][0])>=0:
        dp[0][j] = wv[0][1]
    else:
        dp[0][j] = 0

for i in range(1,n):
    for j in range(w+1):
        if (j-wv[i][0])>=0:
            dp[i][j] = max(dp[i-1][j], dp[i-1][j-wv[i][0]]+wv[i][1])
        else:
            dp[i][j] = dp[i-1][j]

ans = dp[n-1][w]

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

# Multiplication2
import math
N = int(input())
A = list(map(int,input().split()))
ans = [-1, math.prod(A)][math.prod(A) <= 10**18]
print(ans)

### FIXED CODE ###

# Multiplication2
import math
N = int(input())
A = sorted(list(map(int,input().split())))
ans = 1
for a in A:
    ans *= a
    if ans == 0:
        break
    elif ans > 10**18:
        ans = -1
        break
print(ans)
### BUGGY CODE ###

a,b=(int(x) for x in input().split())
count = 0
l = range(a+1)
m = [0 for x in l for y in l for z in l if (x+y+z) == b]

print(len(m))

### FIXED CODE ###

import itertools
a,b=(int(x) for x in input().split())
l = range(a+1)
count = 0
m = [x+y for x,y in itertools.product(l,l) if (x+y)<=b]
for i in m:
  if b-i <= a:
    count+=1
print(count)
### BUGGY CODE ###

N, K, Q = [int(_) for _ in input().split()]

A = []
for _ in range(Q):
  A.append(int(input()) - 1)

score = [K] * N

for a in range(len(A)):
  for i in range(len(score)):
    if i == A[a]:
      continue
    score[i] -= 1

for i in range(len(score)):
  if score[i] <= 0:
    print("No")
  else:
    print("Yes")

### FIXED CODE ###

N, K, Q = [int(_) for _ in input().split()]

A = []
for _ in range(Q):
  A.append(int(input()) - 1)

score = [K - Q] * N

for i in range(len(A)):
  score[A[i]] += 1

for i in range(len(score)):
  if score[i] <= 0:
    print("No")
  else:
    print("Yes")
### BUGGY CODE ###

def main():
    import numpy as np
    s = list(reversed(input()))
    mod = 10**9+7
    memo = np.zeros(13, dtype=np.int64)
    m13 = [(10**i) % 13 for i in range(12)]
    memo[0] = 1
    for j, i in enumerate(s):
        memo2 = np.zeros(13, dtype=np.int64)
        a = m13[j % 12]
        if i == "?":
            for l in a*np.arange(10) % 13:
                memo2[l:] += memo[:13-l]
                memo2[:l] += memo[13-l:]
            memo = memo2 % mod
        else:
            l = a*int(i) % 13
            memo2[l:] += memo[:13-l]
            memo2[:l] += memo[13-l:]
            memo = memo2 % mod
    print(int(memo[5]))


main()

### FIXED CODE ###

s=list(reversed(input()))
mod=10**9+7
memo=[0 for _ in [0]*13]
m13=[(10**i)%13 for i in range(12)]
memo[0]=1
for i in range(len(s)):
    memo2=[0 for _ in [0]*13]
    a=m13[i%12]
    if s[i]=="?":
        list_=[0,1,2,3,4,5,6,7,8,9]
    else:
        list_=[int(s[i])]
    list_=[(a*j)%13 for j in list_]
    for l in list_:
        for j in range(13):
            memo2[(l+j)%13]+=memo[j]
    memo=[j%mod for j in memo2]
print(memo[5])
### BUGGY CODE ###

from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

def bfs():
    c = [[0]*n for i in range(n)]
    dist = [-1]*n
    que = deque([0])
    dist[0] = 0
    v_prev = 0
    k = 0
    while que:
        v = que.popleft()
        d = dist[v]
        color = 1
        used = []
        for w in g[v]:
            if dist[w] > -1:
                used.append(c[v][w])
        for w in g[v]:
            if dist[w] > -1:
                continue
            while color in used:
                color += 1
            c[v][w] = c[w][v] = color
            k = max(k, color)
            dist[w] = d + 1            
            que.append(w)
            color += 1
    return k, c

n = INT()
a = [0]*(n-1)
b = [0]*(n-1)
g = [[] for i in range(n)]
for i in range(n-1):
    a[i], b[i] = MAP()
    a[i] -= 1
    b[i] -= 1
    g[a[i]].append(b[i])
    g[b[i]].append(a[i])
k, c = bfs()
print(k)
for i in range(n-1):
    print(c[a[i]][b[i]])

### FIXED CODE ###

from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def MAP1()  : return map(lambda x:int(x)-1,input().split())
def LIST()  : return list(MAP())

def solve():
    n = INT()
    Q = [tuple(MAP1()) for _ in range(n-1)]

    deg = [0]*n
    adj = [[] for _ in range(n)]
    color = dict()

    for a, b in Q:
        deg[a] += 1
        deg[b] += 1
        adj[a].append(b)
        adj[b].append(a)

    def dfs(s, p):
        nouse = -1
        if p > -1:
            nouse = color[(min(s,p),max(s,p))]
        c = 1
        for t in adj[s]:
            if t == p:
                continue
            if c == nouse:
                c += 1
            color[(min(s,t),max(s,t))] = c
            dfs(t,s)
            c += 1
    
    dfs(1,-1)
    
    print(max(deg))
    for a, b in Q:
        print(color[(a, b)])

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

n, k = map(int,input().split())
a = list(map(int, input().split()))
dst = [1]
ans = 1
for _ in range(k):
    if a[ans - 1] not in dst:
        dst.append(a[ans - 1])
        ans = a[ans - 1]
    else:
        index = dst.index(a[ans - 1])
        ld = len(dst[:index])
        cyc = len(dst[index:])
        print(dst[(ld - 1) + (k + 1 - ld) % cyc] if (k + 1 - ld) % cyc != 0 else dst[-1])
        exit()
print(dst[-1])

### FIXED CODE ###

n, k = map(int,input().split())
a = list(map(int, input().split()))
flg = [True] * n
dst = [1]
twn = 0
for _ in range(k):
    if flg[twn]:
        dst.append(a[twn])
        flg[twn] = False
        twn = a[twn] - 1
    else:
        index = dst.index(a[twn])
        ld = len(dst[:index])
        cyc = len(dst[index:])
        print(dst[(ld - 1) + (k + 1 - ld) % cyc] if (k + 1 - ld) % cyc != 0 else dst[-1])
        exit()
print(dst[-1])
### BUGGY CODE ###

input()
nlist=map(int, raw_input().split())
input()
qlist=map(int, raw_input().split())

n = len(nlist)

def func(idx, m):
    
    if m==0:
        return True
    
    if idx > n-1:
        return False
    
    res=func(idx+1, m) | func(idx+1, m-nlist[idx])
    
    return res


for q in qlist:
    print "yes" if func(0, q) else "no"

### FIXED CODE ###

input()
nlist=map(int, raw_input().split())
input()
qlist=map(int, raw_input().split())

n = len(nlist)

dic = {}

def func(idx, m):
    
    try:
        return dic[m][idx]
    except:
        pass

    if m==0:
        tmp=dic.get(m,{})
        tmp.update({idx: True})
        dic.update({m:tmp})
    elif idx > n-1:
        tmp=dic.get(m,{})
        tmp.update({idx: False})
        dic.update({m:tmp})
        
    elif func(idx+1, m):
        tmp=dic.get(m,{})
        tmp.update({idx: True})
        dic.update({m:tmp})
    elif func(idx+1, m-nlist[idx]):
        tmp=dic.get(m,{})
        tmp.update({idx: True})
        dic.update({m:tmp})
    else:
        tmp=dic.get(m,{})
        tmp.update({idx: False})
        dic.update({m:tmp})
        
    return dic[m][idx]


for q in qlist:
    # print dic
    print "yes" if func(0, q) else "no"
### BUGGY CODE ###

n = int(input())
p = list(map(float, input().split()))

dp = [[0]*(n+1) for _ in range(n+1)]
dp[0][0] = 1
for i in range(1,n+1):
    dp[i][0] = dp[i-1][0]*(1-p[i-1]) 
for i in range(1, n+1):
    for j in range(1, i+1):
        dp[i][j] += dp[i-1][j-1]*p[i-1] + dp[i-1][j]*(1-p[i-1])
        #print(dp, sep='\n')        
ans = 0
for j in range(n//2+1, n+1):
    ans += dp[n][j]

print(ans)
        

### FIXED CODE ###

n = int(input())
p = list(map(float, input().split()))
    
dp = [[0]*(n+1) for _ in range(n+1)]
dp[0][0] = 1

for i in range(0, n):
    for j in range(0, i+1):
        dp[i+1][j+1] = dp[i][j]*p[i]
        dp[i+1][j] = dp[i][j]*(1-p[i]) + dp[i][j-1]*p[i]
        
ans = sum([dp[n][i] for i in range(n//2+1,n+1)])
print(ans)
### BUGGY CODE ###

import sys
input = sys.stdin.readline

def main():
    N,M = map(int,input().split())
    X = [list(map(int,input().split())) for _ in range(N)]
    dp = [0 for _ in range(M+1)]
    for i in range(N):
        for j in range(M-X[i][0]+1)[::-1]:
            dp[j+X[i][0]] = max(dp[j+X[i][0]],dp[j]+X[i][1])

    print(max(dp))

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline

def main():
    N,W = map(int,input().split())
    use = [[] for _ in range(4)]
    wc,v = map(int,input().split())
    use[0].append(v)
    for _ in range(N-1):
        w,v = map(int,input().split())
        use[w-wc].append(v)

    for i in range(4):
        use[i].sort(reverse = True)
        use[i] = [0]+use[i]
        l = len(use[i])
        for x in range(l-1):
            use[i][x+1] += use[i][x]

    ans = 0
    for i in range(min(len(use[3]),W//(wc+3)+1)):
        Wa = W-(wc+3)*i
        for j in range(min(len(use[2]),Wa//(wc+2)+1)):
            Wb = Wa-(wc+2)*j
            for k in range(min(len(use[1]),Wb//(wc+1)+1)):
                Wc = Wb-(wc+1)*k
                l = min(len(use[0])-1,Wc//wc)
                point = use[0][l]+use[1][k]+use[2][j]+use[3][i]
                ans = max(point,ans)
                
    print(ans)
    
if __name__ == "__main__":
    main()