Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def resolve():
    '''
    code here
    '''
    N = int(input())

    def get_sieved_list(x):
        dp = [1 if item % 2 == 0 else 0 for item in range(x+1)]
        dp[:3] = [2,1,1]

        for prim_candi in range(3, x+1):
            temp_num = prim_candi
            while temp_num <= x:
                dp[temp_num] += 1
                temp_num += prim_candi
            if prim_candi >= x:
                return [i  for i in range(x+1) if dp[i] == 1]
                
    factor_filter = set(get_sieved_list(N))

    prime_list = [0 for _ in range(N+1)]
    for i in factor_filter:
        if i >1:
            for j in range(2, N+1):
                while j >= 1 and j % i == 0:
                    j //= i
                    prime_list[i] += 1

    res = 1
    for item in prime_list:
        res *= (item+1)
        res %= (10**9+7)


    print(res%(10**9+7))

if __name__ == "__main__":
    resolve()


Fixed submission:
def resolve():
    '''
    code here
    '''
    N = int(input())

    def get_sieved_list(x):
        dp = [1 if item % 2 == 0 else 0 for item in range(x+1)]
        dp[:3] = [2,1,1]

        for prim_candi in range(3, x+1):
            temp_num = prim_candi
            while temp_num <= x:
                dp[temp_num] += 1
                temp_num += prim_candi
            if prim_candi >= x:
                return [i  for i in range(x+1) if dp[i] == 1]
                
    
    if N > 2:
        factor_filter = set(get_sieved_list(N))
        prime_list = [0 for _ in range(N+1)]
        for i in factor_filter:
            if i >1:
                for j in range(2, N+1):
                    while j >= 1 and j % i == 0:
                        j //= i
                        prime_list[i] += 1

        res = 1
        for item in prime_list:
            res *= (item+1)
            res %= (10**9+7)
    else:
        res = N

    print(res%(10**9+7))

if __name__ == "__main__":
    resolve()
Buggy python submission (verdict: Time Limit Exceeded):
K, S = [int(i) for i in input().split()]
cnt = 0

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

Fixed submission:
K, S = [int(i) for i in input().split()]
cnt = 0

for x in range(K+1):
  for y in range(K+1):
    candi_z = S - x - y 
    if 0<= candi_z <= K:
      cnt += 1
      

print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
K, S = [int(i) for i in input().split()]
cnt = 0

for x in range(K+1):
  for y in range(K+1):
    for z in range(K+1):
      if x + y + z == S:
        cnt += 1
print(cnt)

Fixed submission:
K, S = [int(i) for i in input().split()]
cnt = 0

for x in range(K+1):
  for y in range(K+1):
    candi_z = S - x - y 
    if 0<= candi_z <= K:
      cnt += 1
      

print(cnt)
Buggy python submission (verdict: Runtime Error):
def resolve():
    '''
    code here
    '''
    N = int(input())

    ans_list = [i*(i+1)//2 for i in range(1, N+1)]
    delta = 0
    if N > 1:
        for i in range(1, N+1):
            if ans_list[i-1] < N < ans_list[i]:
                delta = ans_list[i] - N
                res_list = list(range(1, i+2))
                break
            elif N == ans_list[i]:
                res_list = range(1, i+2)
    else:
        res_list = [1]

    if delta > 0:
        while delta > res_list[-1]:
            delta -= res_list[-1]
            del res_list[-1]

        res_list.remove(delta)    
    

    for item in res_list:
        print(item)



if __name__ == "__main__":
    resolve()


Fixed submission:
def resolve():
    '''
    code here
    '''
    N = int(input())

    delta = 0
    if N > 1:
        for i in range(1, N+1):
            if (i-1)*i < 2*N < i*(i+1):
                delta = i*(i+1)//2 - N
                res_list = list(range(1, i+1))
                break
            elif 2*N == i*(i+1):
                res_list = range(1, i+1)
    else:
        res_list = [1]

    if delta > 0:
        while delta > res_list[-1]:
            delta -= res_list[-1]
            del res_list[-1]

        res_list.remove(delta)    
    

    for item in res_list:
        print(item)



if __name__ == "__main__":
    resolve()

Buggy python submission (verdict: Runtime Error):
def resolve():
    '''
    code here
    '''
    N = int(input())

    ans_list = [i*(i+1)//2 for i in range(1, N+1)]

    if N > 1:
        for i in range(1, N+1):
            if ans_list[i-1] < N < ans_list[i]:
                delta = ans_list[i] - N
                res = list(range(1, i+2))
                res.remove(delta)
                break
            elif N == ans_list[i]:
                res = range(1, i+2)
    else:
        res = [1]

    for item in res:
        print(item)



if __name__ == "__main__":
    resolve()


Fixed submission:
def resolve():
    '''
    code here
    '''
    N = int(input())

    delta = 0
    if N > 1:
        for i in range(1, N+1):
            if (i-1)*i < 2*N < i*(i+1):
                delta = i*(i+1)//2 - N
                res_list = list(range(1, i+1))
                break
            elif 2*N == i*(i+1):
                res_list = range(1, i+1)
    else:
        res_list = [1]

    if delta > 0:
        while delta > res_list[-1]:
            delta -= res_list[-1]
            del res_list[-1]

        res_list.remove(delta)    
    

    for item in res_list:
        print(item)



if __name__ == "__main__":
    resolve()
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())

leng = int(math.log(n, 26))
org = leng
res = []
for i in reversed(range(leng)):
    leng = int(math.log(n, 26))
    num = n // 26**leng
    dum = n % 26**leng
    if dum == 0:
        res=('z'*org)
    else:
        res.append(chr(96+num))
    n -= 26**leng*num

if n%26 != 0:
    res.append(chr(96+n%26))

print(''.join(res))

Fixed submission:
n = int(input())
ans = ''
while n != 0:
    n -= 1
    ans += chr(ord('a') + n % 26)
    n //= 26
print(ans[::-1])

Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
leng = int(math.log(n, 26))
res = []
for i in reversed(range(leng)):
    leng = int(math.log(n, 26))
    num = n // 26**leng
    res.append(chr(96+num))
    n -= 26**leng*num

if n%26 != 0:
    res.append(chr(96+n%26))

print(''.join(res))

Fixed submission:
n = int(input())
ans = ''
while n != 0:
    n -= 1
    ans += chr(ord('a') + n % 26)
    n //= 26
print(ans[::-1])
Buggy python submission (verdict: Runtime Error):
x, n = map(int, input().split())
if n!=0:
    p = input().split()
    p = [int(i) for i in p]

if not(x in p):
    print(x)
else:
    for i in range(101):
        if not(x-i in p):
            print(x-i)
            break
        elif not(x+i in p):
            print(x+i)
            break
        else:
            continue

Fixed submission:
x, n = map(int, input().split())
if n==0:
    print(x)
else:
    p = input().split()
    p = [int(i) for i in p]
    if not(x in p):
        print(x)
    else:
        for i in range(101):
            if not(x-i in p):
                print(x-i)
                break
            elif not(x+i in p):
                print(x+i)
                break
            else:
                continue

Buggy python submission (verdict: Runtime Error):
x, n = map(int, input().split())
if n!=0:
    p = input().split()
    p = [int(i) for i in p]

if not(x in p):
    print(x)
else:
    for i in range(101):
        if not(x-i in p):
            print(x-i)
            break
        elif not(x+i in p):
            print(x+i)
            break

Fixed submission:
x, n = map(int, input().split())
if n==0:
    print(x)
else:
    p = input().split()
    p = [int(i) for i in p]
    if not(x in p):
        print(x)
    else:
        for i in range(101):
            if not(x-i in p):
                print(x-i)
                break
            elif not(x+i in p):
                print(x+i)
                break
            else:
                continue
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = input().split()
i_list = list(range(len(a)))
a = [int(a[i]) for i in i_list]
c = [0]*n
d = [0]*n

for i in range(n):
    dum = [i]*n
    d[i] = list(map(lambda y,z: abs(y-z), i_list, dum))

for m in range(50):
    for i in range(n):
        b = list(map(lambda x,y: x-y, a, d[i]))
        c[i] = sum(1 for x in b if x >=0)
    a = []
    a += c
a = [str(aa) for aa in a]
print(' '.join(a))

Fixed submission:
s = input()
print(s[:3])
Buggy python submission (verdict: Runtime Error):
a, b = int(input())
print(a*b)

Fixed submission:
a, b = map(int, input().split())
print(a*b)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

res = 1
for i in range(n):
    res *= a[i]
    if res == 0:
        break

if res > 10**18:
    res = -1

print(res)

Fixed submission:
n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
ans = 1
flg = False

for i in range(n):
    if a[i] == 0:
        ans = 0
        break
if ans == 0 :
    print(ans)
else:
    for i in range(n):
        ans *= a[i]
        if ans > 10**18:
            flg = True
            break
    if flg:
        print(-1)
    else:
        print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N = int(input())
A = input().split()
Ai = [int(s) for s in A]
count = 0
for x, y in itertools.combinations(range(N), 2):
        if abs(x-y) == Ai[x]+Ai[y]:
            count += 1
print(count)

Fixed submission:
from collections import defaultdict
dic = defaultdict(int)

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

for i, a in enumerate(A):
    dic[i + a] += 1

counter = 0
for i, a in enumerate(A):
    counter += dic[i-a]

print(counter)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N = int(input())
A = input().split()
Ai = [int(s) for s in A]
count = 0
for x, y in itertools.combinations(range(N), 2):
        if abs(x-y) == Ai[x]+Ai[y]:
            count += 1
print(count)

Fixed submission:
from collections import defaultdict
dic = defaultdict(int)

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

for i, a in enumerate(A):
    dic[i + a] += 1

counter = 0
for i, a in enumerate(A):
    counter += dic[i-a]

print(counter)
Buggy python submission (verdict: Runtime Error):
for i in range(1, 101):
    if a%i==0 and b%i==0:
        cnt += 1
    if cnt == k:
        print(i)
        break

Fixed submission:
a, b, k = map(int, input().split())
cnt = 0
for i in reversed(range(1, 101)):
    if a%i==0 and b%i==0:
        cnt += 1
        if cnt == k:
            print(i)
            break

Buggy python submission (verdict: Runtime Error):
for i in range(100):
    if a%i==0 and b%i==0:
        cnt += 1
    if cnt == k:
        print(i)
        break

Fixed submission:
a, b, k = map(int, input().split())
cnt = 0
for i in reversed(range(1, 101)):
    if a%i==0 and b%i==0:
        cnt += 1
        if cnt == k:
            print(i)
            break

Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
import math
g = math.gcd(a, b)
cnt = 0
for i in range(1, g+1):
    if g % i == 0:
        cnt += 1
    if cnt == k:
        print(i)
        break

Fixed submission:
a, b, k = map(int, input().split())
cnt = 0
for i in reversed(range(1, 101)):
    if a%i==0 and b%i==0:
        cnt += 1
        if cnt == k:
            print(i)
            break

Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

import math
gcd = math.gcd(a, b)
cnt = 0
for i in range(1, gcd+1):
    if gcd % i == 0:
        cnt += 1
    if cnt == k:
        print(i)
        break



Fixed submission:
a, b, k = map(int, input().split())
cnt = 0
for i in reversed(range(1, 101)):
    if a%i==0 and b%i==0:
        cnt += 1
        if cnt == k:
            print(i)
            break
Buggy python submission (verdict: Time Limit Exceeded):
# qiitaにはbit全探索とは書いてないけど、bitが良さげ。
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

n = int(input())
fac_list = factorization(n)

p = []
for i in range(len(fac_list)):
    for j in range(fac_list[i][1]):
        p.append(fac_list[i][0])

l = n
for i in range(2 ** len(p)):
    a = 1
    for j in range(len(p)):
        if ((i >> j) & 1):
            a *= p[j]
    b = int(n/a)
    l = min(l, max(len(str(a)),len(str(b))))
print(l)

Fixed submission:
# qiitaにはbit全探索とは書いてないけど、bitが良さげ。
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

n = int(input())
fac_list = factorization(n)

p = []
for i in range(len(fac_list)):
    for j in range(fac_list[i][1]):
        p.append(fac_list[i][0])

l = n
for i in range(2 ** len(p)):
    a = 1
    for j in range(len(p)):
        if ((i >> j) & 1):
            a *= p[j]
    b = int(n/a)
    l = min(l, max(len(str(a)),len(str(b))))
print(l)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
k = int(input())

for _ in range(k):
    if b =< a:
        b *= 2
    elif c =< b:
        c *= 2

if a < b and b < c:
    print("Yes")
else:
    print("No")

Fixed submission:
a,b,c = map(int, input().split())
k = int(input())

for _ in range(k):
    if b <= a:
        b *= 2
    elif c <= b:
        c *= 2

if a < b and b < c:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
for i in range(100):
    if c-b <= 0:
        print("yes")
        break
    elif  a-d <= 0:
        print("No")
        break
    else:
        a = a-d
        c = c-b

Fixed submission:
s,w = map(int,input().split())
if s <= w:
    print("unsafe")
else:
    print("safe")
Buggy python submission (verdict: Time Limit Exceeded):
import math
k = int(input())
ans=0
for x in range(1,k+1):
    for y in range(1,k+1):
        for z in range(1,k+1):
            ans += math.gcd(math.gcd(x, y),z)
print(ans)

Fixed submission:
from math import gcd
k = int(input())
ans = 0
for x in range(1, k + 1):
    for y in range(1, k + 1):
        a = gcd(x, y)
        for z in range(1, k + 1):
            ans += gcd(a, z)
print(ans)
Buggy python submission (verdict: Runtime Error):
r,g,b = map(int(), input().split())
num = r*100 + g*10 + b
if num % 4 == 0:
    print("YES")
else:
    print("NO")

Fixed submission:
r,g,b = map(int, input().split())
num = r*100 + g*10 + b
if num % 4 == 0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N = int(input())
A = list(map(int, input().split()))
M = 10**9+7

result = 0
for itr in itertools.combinations(A,2):
    result = (result + (itr[0]*itr[1])%M)%M

print(result)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
M = 10**9+7

ruisekiwa = [0]*N
wa = sum(A)%M

result = 0
for i in range(N):
    wa -= A[i]
    result = (result+(A[i]*wa)%M)%M

print(result)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = []
for n in range(1,N+1):
    result = 0
    for x in range(1,int(n**(1/2))+1):
        if x**2 < n:
            for y in range(1,int(n**(1/2))+1):
                if (x+y)**2-4*((x**2+y**2+x*y) - n) >= 0:
                    z = (-(x+y)+((x+y)**2-4*((x**2+y**2+x*y) - n))**(1/2))/2
                    if (z%1)==0 and z > 0:
                        result += 1
                            
    ans += [result]

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

Fixed submission:
import itertools
N = int(input())
ans = [0 for i in range(0,N)]
for x, y, z in itertools.product(range(1,int(N**(1/2)+1)),range(1,int(N**(1/2)+1)),range(1,int(N**(1/2)+1))):
    kai = x**2+y**2+z**2+x*y+x*z+y*z
    if 0 < kai <= N:
        ans[kai-1] += 1

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

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = []
for n in range(1,N+1):
    result = 0
    for x in range(1,int(n**(1/2))+1):
        if x**2 < n:
            for y in range(1,int(n**(1/2))+1):
                if x**2+y**2 < n:
                    for z in range(1,int(n**(1/2))+1):
                        if x**2+y**2+z**2+x*y+y*z+z*x==n:
                            result += 1
    ans += [result]

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

Fixed submission:
import itertools
N = int(input())
ans = [0 for i in range(0,N)]
for x, y, z in itertools.product(range(1,int(N**(1/2)+1)),range(1,int(N**(1/2)+1)),range(1,int(N**(1/2)+1))):
    kai = x**2+y**2+z**2+x*y+x*z+y*z
    if 0 < kai <= N:
        ans[kai-1] += 1

print("\n".join(map(str,ans)))
Buggy python submission (verdict: Runtime Error):
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

Ai = 0
Bi = 0
t = 0
result = 0

while True:
    if Ai>=N:
        break
    elif t + A[Ai] <= K:
        t += A[Ai]
        Ai += 1
    else:
        break
result = Ai

while True:
    if Ai < 1 or Bi>=M:
        break
    if t + B[Ai] <= K:
        t += B[Bi]
        Bi += 1
        if Ai+Bi > result:
            result = Ai+Bi
    else:
        t -= A[Ai-1]
        Ai -= 1

print(result)

Fixed submission:
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

Ai = 0
Bi = 0
t = 0
result = 0

while True:
    if Ai>=N:
        break
    elif t + A[Ai] <= K:
        t += A[Ai]
        Ai += 1
    else:
        break
result = Ai

while True:
    if Bi >=  M:
        break
    if t + B[Bi] <= K:
        t += B[Bi]
        Bi += 1
        if Ai+Bi > result:
            result = Ai+Bi
    else:
        if Ai < 1:
            break
        t -= A[Ai-1]
        Ai -= 1

print(result)
Buggy python submission (verdict: Runtime Error):
import math
A, B = list(map(decimal, input().split()))
B = B*100
print(math.floor(A*B/100))

Fixed submission:
import math
from decimal import *
A, B = list(map(Decimal, input().split()))
print(math.floor(A*B))

Buggy python submission (verdict: Runtime Error):
import math
A, B = list(map(decimal, input().split()))
print(math.floor(A*B))

Fixed submission:
import math
from decimal import *
A, B = list(map(Decimal, input().split()))
print(math.floor(A*B))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
X = int(input())

i = 0
while True:
    n = abs(i**5 - X)**(1/5)
    if n.is_integer():
        if (i**5 - X) < 0:
            n *= -1
        if i**5-n**5==X:
            print(i,int(n))
            break
    n = abs((-i)**5 - X)**(1/5)
    if n.is_integer():
        if (i**5 - X) < 0:
            n *= -1
        if i**5-n**5==X:
            print(i,int(n))
            break
    i += 1

Fixed submission:
X = int(input())

flag = False
for i in range(150):
    for j in range(150):
        if i**5 - j**5 == X:
            print(i,j)
            flag = True
            break
        if (-i)**5 - j**5 == X:
            print(-i,j)
            flag = True
            break
        if i**5 - (-j)**5 == X:
            print(i,-j)
            flag = True
            break
        if (-i)**5 - (-j)**5 == X:
            print(-i,-j)
            flag = True
            break
    if flag:
        break
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

se = set()
dic = dict()
for i in range(N):
    if A[i] in se:
        dic[A[i]] += 1
    else:
        se.add(A[i])
        dic.update({A[i]: 1})
        
result = [0]*N
for i in range(N):
    for k in dic.keys():
        if A[i] == k:
            result[i] += (dic[k]-1)*(dic[k]-2)//2
        else:
            result[i] += (dic[k])*(dic[k]-1)//2

print("\n".join(list(map(str, result))))


Fixed submission:
N = int(input())
A = list(map(int, input().split()))

se = set()
dic = dict()

for i in range(N):
    if A[i] in se:
        dic[A[i]] += 1
    else:
        se.add(A[i])
        dic.update({A[i]: 1})

c = 0
for k in dic.keys():
    c += (dic[k])*(dic[k]-1)//2

result = [0]*N
for i in range(N):
    result[i] = c - (dic[A[i]])*(dic[A[i]]-1)//2 + (dic[A[i]]-1)*(dic[A[i]]-2)//2

print("\n".join(list(map(str, result))))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

se = set()
dic = dict()
for i in range(N):
    if A[i] in se:
        dic[A[i]] += 1
    else:
        se.add(A[i])
        dic.update({A[i]: 1})

for i in range(N):
    result = 0
    for k in dic.keys():
        if A[i] == k:
            result += (dic[k]-1)*(dic[k]-2)//2
        else:
            result += (dic[k])*(dic[k]-1)//2
    print(result)


Fixed submission:
N = int(input())
A = list(map(int, input().split()))

se = set()
dic = dict()

for i in range(N):
    if A[i] in se:
        dic[A[i]] += 1
    else:
        se.add(A[i])
        dic.update({A[i]: 1})

c = 0
for k in dic.keys():
    c += (dic[k])*(dic[k]-1)//2

result = [0]*N
for i in range(N):
    result[i] = c - (dic[A[i]])*(dic[A[i]]-1)//2 + (dic[A[i]]-1)*(dic[A[i]]-2)//2

print("\n".join(list(map(str, result))))
Buggy python submission (verdict: Runtime Error):
H, W = map(int, input().split())
s = []
for _ in range(H):
    s += [list(input())]

ls = [[0]*W for _ in range(H)]
ls[0][0] = int(bool(s[0][0]=="#"))

for i in range(1,H):
    ls[0][i] = ls[0][i-1]+ int(bool(s[0][i]=="." and s[0][i-1]=="#"))
    
for j in range(1,W):
    ls[j][0] = ls[j-1][0]+ int(bool(s[j][0]=="." and s[j-1][0]=="#"))

for i in range(1,H):
    for j in range(1,W):
        ls[j][i] = min(ls[j][i-1]+ int(bool(s[j][i]=="." and s[j][i-1]=="#")),
                       ls[j-1][i]+ int(bool(s[j][i]=="." and s[j-1][i]=="#")))
        
print(ls[-1][-1])


Fixed submission:
H, W = map(int, input().split())
s = []
for _ in range(H):
    s += [list(input())]

ls = [[0]*W for _ in range(H)]
ls[0][0] = int(bool(s[0][0]=="#"))

for i in range(1,W):
    ls[0][i] = ls[0][i-1]+ int(bool(s[0][i]=="#" and s[0][i-1]=="."))
    
for j in range(1,H):
    ls[j][0] = ls[j-1][0]+ int(bool(s[j][0]=="#" and s[j-1][0]=="."))

for i in range(1,W):
    for j in range(1,H):
        ls[j][i] = min(ls[j][i-1]+ int(bool(s[j][i]=="#" and s[j][i-1]==".")),
                       ls[j-1][i]+ int(bool(s[j][i]=="#" and s[j-1][i]==".")))
        
print(ls[-1][-1])