Chef and his girlfriend are going to have a promenade. They are walking along the straight road which consists of segments placed one by one. Before walking Chef and his girlfriend stay at the beginning of the first segment, they want to achieve the end of the last segment. 
There are few problems: 

-  At the beginning Chef should choose constant integer - the velocity of mooving. It can't be changed inside one segment. 
-  The velocity should be decreased by at least 1 after achieving the end of some segment. 
-  There is exactly one shop on each segment. Each shop has an attractiveness. If it's attractiveness is W and Chef and his girlfriend move with velocity V then if V < W girlfriend will run away into the shop and the promenade will become ruined. 

Chef doesn't want to lose her girl in such a way, but he is an old one, so you should find the minimal possible velocity at the first segment to satisfy all conditions.


-----Input-----
- The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
- The first line of each test case contains a single integer N denoting the number of segments. The second line contains N space-separated integers W1, W2, ..., WN denoting the attractiveness of shops. 

-----Output-----
- For each test case, output a single line containing the minimal possible velocity at the beginning.

-----Constraints-----
- 1 ≤ T ≤ 10
- 1 ≤ N ≤ 10^5
- 1 ≤ Wi ≤ 10^6

-----Example-----
Input:

2
5
6 5 4 3 2
5
3 4 3 1 1

Output:

6
5

-----Explanation-----
Example case 1. 
If we choose velocity 6, on the first step we have 6 >= 6 everything is OK, then we should decrease the velocity to 5 and on the 2nd segment we'll receive 5 >= 5, again OK, and so on. 
Example case 2. 
If we choose velocity 4, the promanade will be ruined on the 2nd step (we sould decrease our velocity, so the maximal possible will be 3 which is less than 4).

Difficulty: interview

Starter code:

Solutions:
T = int(input())
for i in range(T):
 x = int(input())
 l= [int(x) for x in input().split()]
 t=[]
 for i in range(len(l)):
  t.append(l[i]+i) 
 print(max(t))

# cook your dish here
t=int(input())
while t:
 t=t-1
 n = int(input())
 l = list(map(int,input().split()))
 l.reverse()
 c = 0
 for i in range(n):
  if(c>=l[i]):
   pass
  else:
   c = l[i]
  c = c+1
 print(c-1)

# cook your dish here
for i in range(int(input())):
 n = int(input())
 l = list(map(int,input().split()))
 l.reverse()
 c = 0
 for i in range(n):
  if(c>=l[i]):
   pass
  else:
   c = l[i]
  c = c+1
 print(c-1)
 


T = int(input())
for i in range(T):
 x = int(input())
 l= [int(x) for x in input().split()]
 t=[]
 for i in range(len(l)):
  t.append(l[i]+i) 
 print(max(t))


for _ in range(int(input())):
 n=int(input())
 l=[int(x) for x in input().split()]
 l.reverse();
 x=l[0]
 x=x+1
 for i in range(1,n):
  x=max(x,l[i])
  x+=1
 print(x-1)

for _ in range(int(input())):
 n=int(input())
 l=[int(x) for x in input().split()]
 l.reverse()
 x=l[0]
 x=x+1 
 for i in range(1,n):
  x=max(x,l[i])
  x=x+1 
 print(x-1)
 


t=int(input())
while(t>0):
 n=int(input())
 l=list(map(int,input().split()))
 ans=l[0]
 for i in range(1,n):
  ans=max(ans,l[i]+i)
 print(ans)
 t-=1

# cook your dish here
for _ in range(0,int(input())):
 n=int(input())
 l=list(map(int,input().split()))
 a=[]
 for i in range(0,n):
  a.append(i+l[i])
 a.sort(reverse=True)
 print(a[0])

# cook your dish here
t=int(input())
for _ in range(t):
 n=int(input())
 m=list(map(int,input().split()))
 temp,speed=m[0],m[0]
 for i in range(1,n):
  if temp<m[i]:
   speed+=m[i]-temp
   temp=speed-i-1
  else:
   temp-=1 
 print(speed)
 


t = int(input())
while t:
 t -= 1 
 n = int(input()) 
 L = [int(x) for x in input().split()]
 L.reverse()
 count = 0 
 for i in range(n):
  if L[i] > count:
   count = L[i]
  count += 1 
 print(count-1)

case = int(input())
for i in range(case):
 n = int(input())
 ls = list(map(int,input().split()))
 ls.reverse()
 cnt = 0
 for j in range(n):
  if cnt >= ls[j]:
   pass
  else :
   cnt = ls[j]
  cnt += 1
 print(cnt-1)

# cook your dish here
t=int(input())
for _ in range(t):
 n=int(input())
 l = list(map(int,input().split()))
 
 temp,speed = l[0],l[0]
 
 for i in range(1,n):
  
  if temp < l[i]:
   
   speed += l[i] - temp
   temp = speed-i-1
   
  else:
   temp -= 1
   
 print(speed)

# cook your dish here
t=int(input())
for _ in range(t):
 n=int(input())
 l = list(map(int,input().split()))
 
 temp,speed = l[0],l[0]
 
 for i in range(1,n):
  
  if temp < l[i]:
   
   speed += l[i] - temp
   temp = speed-i-1
   
  else:
   temp -= 1
   
 print(speed)

def find(arr):
 hello=[]
 for i in range(len(arr)):
  hello.append(arr[i]+i)
 return max(hello)

t = int(input())
for i in range(t):
 n = int(input())
 arr = list(map(int, input().strip().split()))
 print(find(arr))

for i in range(int(input())):
 x=int(input())
 l= [ int(x) for x in input().split()]
 t=[]
 for i in range(len(l)):
  t.append(l[i]+i)
 print(max(t))
# cook your dish here


for _ in range(int(input())):
 n=int(input())
 ar=[int(x) for x in input().split()]
 an=max(ar)
 d=1
 for i in range(1,n):
  if an-d<ar[i]:
   an+=ar[i]-(an-d)
  d+=1
 print(an)
   


# cook your dish here
t=int(input())
for _ in range(t):
 n=int(input())
 l=list(map(int,input().split()))
 m=l[0]
 index=0
 for i in range(len(l)-1,-1,-1):
  if l[i]+i>m:
   index=i
   m=l[i]+i
   
 
 print(m)


# cook your dish here
for i in range(int(input())):
 n = int(input())
 arr = list(map(int, input().split()))
 res = []
 for i in range(n):
  res.append(arr[i]+i)
 print(max(res)) 

for _ in range(int(input())):
 n = int(input())
 lis = list(map(int,input().split()))
 maxx = []
 for i in range(n):
  maxx.append(lis[i]+i)
 print(max(maxx))

T = int(input())
ans = []

for _ in range(T):
 N = int(input())
 W = [int(i) for i in input().split()]

 for i in range(N):
  W[i] += i

 ans.append(max(W))

for i in ans:
 print(i)


t = int(input())
for _ in range(t):
 n = int(input())
 wlist = list(map(int, input().split()))
 maxi = 0
 for j in range(0,n):
  if wlist[j] + j > maxi:
   maxi = wlist[j] + j
 print(maxi)


for _ in range(int(input())):
 n=int(input())
 a=list(map(int,input().split()))
 a=a[::-1]
 m=0
 b=[i for i in a]
 for i in range(1,n):
  b[i]=b[i-1]+1
 for i in range(n):
  m=max(m,a[i]-b[i])
 print(max(b[n-1]+m,b[n-1]))

for _ in range(int(input())):
 input()
 a = list(map(int, input().split()))
 print(max(a[i]+i for i in range(len(a))))


for _ in range(int(input())):
 N=int(input())
 arr=list(map(int,input().split()))
 s=[]
 for i in range(len(arr)):
  s.append(arr[i]+i)
 print(max(s))

t=int(input().strip())
for _ in range(t):
 n = int(input().strip())
 w = list(map(int,input().strip().split(" ")))
 ans = 0
 for i in range(len(w)):
  ans = max(w[i]+i,ans)
 print(ans)