Once Algorithm guru gave a simple problem to his students.He gave a list of n integers say, A={a1,a2,a3...an} and another integer, x representing the expected sum.
He said students to select numbers from array list(0 or more numbers) such that the sum of these numbers is as close as possible but not exceeding to the sum x.

Note:Each element of A can be selected multiple times.If no element is selected then the sum is 0.

Input Format:

The first line contains T the number of test cases. 
Each test case is followed by two lines. First line contains two integers n,x, representing the length of list A and expected sum.
Second line consists of n space separated integers, a1,a2,…,an, representing the elements of list A.

Output Format:

Output T lines, the maximum sum for each test case which is as near as possible, but not exceeding, to the expected sum x.

Constraints:

1≤T≤10 

1≤n≤3000 

1≤x≤3000 

1≤ai≤3000,(1 ≤ i ≤ n)

SAMPLE INPUT
2
3 12
1 6 9
5 9
3 4 4 4 8

SAMPLE OUTPUT
12
9

Explanation

In the first test case, one can pick {6, 6}. 
In the second, we can pick {3,3,3}
Register for IndiaHacks
t=input()
while t:
	t-=1
	n,k=map(int,raw_input().split())
	a=map(int,raw_input().split())
	pos=[False]*(k+1)
	current=[False]*(k+1)
	for x in a:
		y=x
		while y<=k:
			current[y]=True
			y+=x
	
	pos=list(current)
	pos[0]=True
	i=0
	while i<=k:
		if (current[i]):
			j=i
			while j<=k:
				if (current[i] and current[j] and i+j<=k):
					pos[i+j]=True
				j+=1
		i+=1
	
	i=k
	while i>=0:
		if (pos[i]==True):
			print i
			break
		i-=1