New Year is coming! Vasya has prepared a New Year's verse and wants to recite it in front of Santa Claus.

Vasya's verse contains $n$ parts. It takes $a_i$ seconds to recite the $i$-th part. Vasya can't change the order of parts in the verse: firstly he recites the part which takes $a_1$ seconds, secondly — the part which takes $a_2$ seconds, and so on. After reciting the verse, Vasya will get the number of presents equal to the number of parts he fully recited.

Vasya can skip at most one part of the verse while reciting it (if he skips more than one part, then Santa will definitely notice it).

Santa will listen to Vasya's verse for no more than $s$ seconds. For example, if $s = 10$, $a = [100, 9, 1, 1]$, and Vasya skips the first part of verse, then he gets two presents.

Note that it is possible to recite the whole verse (if there is enough time). 

Determine which part Vasya needs to skip to obtain the maximum possible number of gifts. If Vasya shouldn't skip anything, print 0. If there are multiple answers, print any of them.

You have to process $t$ test cases.


-----Input-----

The first line contains one integer $t$ ($1 \le t \le 100$) — the number of test cases.

The first line of each test case contains two integers $n$ and $s$ ($1 \le n \le 10^5, 1 \le s \le 10^9$) — the number of parts in the verse and the maximum number of seconds Santa will listen to Vasya, respectively.

The second line of each test case contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^9$) — the time it takes to recite each part of the verse.

It is guaranteed that the sum of $n$ over all test cases does not exceed $10^5$.


-----Output-----

For each test case print one integer — the number of the part that Vasya needs to skip to obtain the maximum number of gifts. If Vasya shouldn't skip any parts, print 0.


-----Example-----
Input
3
7 11
2 9 1 3 18 1 4
4 35
11 9 10 7
1 8
5

Output
2
1
0



-----Note-----

In the first test case if Vasya skips the second part then he gets three gifts.

In the second test case no matter what part of the verse Vasya skips.

In the third test case Vasya can recite the whole verse.

Difficulty: interview

Starter code:

Solutions:
t = int(input())
for i in range(t):
    n, s = [int(x) for x in input().split()]
    a= [int(x) for x in input().split()]
    need = -1
    if (sum(a)) <= s:
        print(0)
    else:
        for i in range(n):
            if a[i] > need:
                need= a[i]
                index = i
            if s - a[i] < 0:
                print(index + 1)
                break
            s -= a[i]
        


t=int(input())
for i in range(t):
    n,s=list(map(int,input().split()))
    a=list(map(int,input().split()))
    mx,sm,mxi=0,0,0
    k=True
    for ii in range(len(a)):
        i=a[ii]
        sm+=i
        if i > mx:
            mx,mxi=i,ii
        if sm>s:
            break
    else:
        k=False
    if k==False:
        print(0)
    else:
        sm-=mx
        ad=0
        for ij in range(ii,len(a)):
            j=a[ij]
            ad+=1
            sm+=i
            if sm>s:
                break
        if ad==0:
            print(0)
        else:
            print(mxi+1)


import sys
from collections import Counter
from math import *

# sys.stdin = open("in.txt")

for _ in range(int(input())):
    n, s = list(map(int, input().split()))
    a = list(map(int, input().split()))
    if sum(a) <= s:
        print(0)
        continue
    L = 0
    R = n + 1
    ans = 0
    while R - L > 1:
        m = (L + R) // 2
        if sum(a[:m]) - max(a[:m]) > s:
            R = m
        else:
            L = m
            ans = a.index(max(a[:m]))
    print(ans + 1)


T = int(input())
for _ in range(T):
    N, S = map(int, input().split())
    A = [int(a) for a in input().split()]
    if S >= sum(A):
        print(0)
    else:
        ma = 0
        mai = -1
        s = 0
        for i in range(N):
            s += A[i]
            if A[i] > ma:
                ma = A[i]
                mai = i+1
            if s > S:
                print(mai)
                break

for tc in range(int(input())):
    n,tottime = list(map(int, input().split()))
    ls = list(map(int, input().split()))
    if sum(ls) <= tottime:
        print(0)
        continue
    mxseen = 0
    mxidx = 0
    totsofar = 0
    for i,e in enumerate(ls):
        if totsofar + e - max(e,mxseen) > tottime:
            break
        totsofar += e
        if mxseen < e:
            mxseen = e
            mxidx = i+1
        if totsofar-mxseen > tottime:
            break
    print(mxidx)


for __ in range(int(input())):
    n, s = list(map(int, input().split()))
    ar = list(map(int, input().split()))
    if sum(ar) <= s:
        print(0)
    else:
        ans = 0
        lol = ar[0]
        kek = 0
        ans1 = 0
        flag = 0
        for i in range(n):
            if ar[i] > lol and  flag == 0:
                lol = ar[i]
                kek = i
            if s - ar[i] >= 0 and flag == 0:
                ans += 1
                s -= ar[i]
            elif s - ar[i] >= 0:
                ans1 += 1
                s -= ar[i]
            elif flag == 1:
                break
            else:
                ans1 = ans - 1
                s += lol
                flag = 1
                if s - ar[i] >= 0:
                    ans1 += 1
                    s -= ar[i]
                else:
                    break
        print(kek + 1)

import sys


# inf = open('input.txt', 'r')
# reader = (map(int, line.split()) for line in inf)
reader = (list(map(int, line.split())) for line in sys.stdin)
input = reader.__next__

t, = input()
for _ in range(t):
    n, s = input()
    a = list(input())
    i = 0
    left = 0
    maxSt = 0
    maxId = -1
    while i < n:
        left += a[i]
        if maxSt < a[i]:
            maxSt = a[i]
            maxId = i
        if left > s:
            break
        i += 1
    if i == n:
        print(0)
    else:
        print(maxId + 1)
    
# inf.close()


"""#!/usr/bin/env pypy"""
import collections
#import random
import heapq
import bisect
import math
import time


class Solution2:
    def solve(self, A1, A2):
        pass


def gcd(a, b):
    if not b: return a
    return gcd(b, a%b)
def lcm(a, b):
    return b*a//gcd(b,a)


class Solution:

    def solve(self, A, s):
        if sum (A) <= s: return 0
        out = 0
        used = 0
        max_seen = 0
        for i, n in enumerate(A):
            if n > max_seen:
                used += max_seen
                max_seen = n
                if used > s: break
                out = i+1
            else:
                used += n
            if used > s: break
        return out

sol = Solution()
sol2 = Solution2()

TT = int(input())
for test_case in range(TT):
    N, K=input().split()
    #s = input()
    #a = []
    #for _ in range(int(N)):
        #a.append([int(c) for c in input().split()])
    b = [int(c) for c in input().split()]

    out = sol.solve(b, int(K))
    print(str(out))
    #print(str(out))

    # out2 = sol2.solve(s)


# for _ in range(100000):
#     rand = [random.randrange(60) for _ in range(10)]
#     out1 = sol.solve(rand)
#     out2 = sol2.solve(rand)
#     if out1 != out2: 
#         print(rand, out1, out2)
#         break


for _ in range(int(input())):
    n, s = list(map(int, input().split()))
    a = tuple(map(int, input().split()))
    ans = 0
    ans1 = 0
    s1 = 0
    for i in range(n):
        if a[i] > a[ans]:
            ans = i
        s1 += a[i]
        if s1 > s:
            break
        ans1 += 1
    ans2 = 0
    s2 = 0
    for i in range(n):
        if i == ans:
            continue
        s2 += a[i]
        if s2 > s:
            break
        ans2 += 1
    if ans1 > ans2:
        print('0')
    else:
        print(ans + 1)


T = int(input())
for t in range(T):
    n, s = map(int, input().split())
    v = list(map(int, input().split()))
    
    tot = 0
    j = 0
    for i in range(n):
        tot += v[i]
        if tot - max(v[i], v[j]) > s:
            tot -= v[i]
            break
        if v[i] > v[j]:
            j = i
        
    if tot <= s:
        print(0)
    else:
        print(j+1)

def sol():
    n, s = list(map(int, input().split()))
    pref = list(map(int, input().split()))
    mx = [pref[0]]
    ind = [0]
    for j in range(1, n):
        if pref[j] > mx[-1]:
            ind.append(j)
        else:
            ind.append(ind[-1])
        mx.append(max(mx[-1], pref[j]))
        pref[j] += pref[j - 1]
    jnd = 0
    for j in range(n):
        if pref[j] <= s:
            jnd = 0
        elif pref[j] - mx[j] <= s:
            jnd = ind[j] + 1
    print(jnd)


for i in range(int(input())):
    sol()