import java.io.*;
import java.util.*;
public class Main{
int n;
for(int t=0;t<n;t++){
m=s.readLine().split(" ");
int[] v
=new int[Integer.
valueOf(m
[0])]; break;
}
for(int i
=0;i
<Integer.
valueOf(m
[0]);i
++){ int cv
=Integer.
parseInt(s.
readLine()); if(cv>1000){
break;
}else{
v[i]=cv;
}
}
//for(int i=v.length-1;i>=0;i--){
//System.out.println("i = "+i +" value ="+v[i]);
//}
boolean ca=false;
for(int i=v.length-1;i>=0;i--){
int sum=0;
//System.out.println(" from value = "+v[i]);
for(int j=v.length-1;j>=0;j--){
//System.out.println("checking value 1 = "+ sum +" value 2 = "+ v[j] );
if(sum<=value && sum+v[j]<=value){
//if(v[j]<=value)
// System.out.println();
// System.out.println("acctual");
// System.out.println("value 1 = "+ sum +" value 2 = "+ v[j] );
sum=sum+v[j];
// System.out.println(" sum value = "+sum);
}
}
if(sum==value){ca=true;break;}
}
if(ca==true){
}
else{
}
}
}
}
aW1wb3J0IGphdmEuaW8uKjsKaW1wb3J0IGphdmEudXRpbC4qOwpwdWJsaWMgY2xhc3MgTWFpbnsKcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgdGhyb3dzIEV4Y2VwdGlvbnsKQnVmZmVyZWRSZWFkZXIgcz0gbmV3IEJ1ZmZlcmVkUmVhZGVyKG5ldyBJbnB1dFN0cmVhbVJlYWRlcihTeXN0ZW0uaW4pKTsKaW50IG47Cm49SW50ZWdlci5wYXJzZUludChzLnJlYWRMaW5lKCkpOwpmb3IoaW50IHQ9MDt0PG47dCsrKXsKU3RyaW5nW10gbTsKbT1zLnJlYWRMaW5lKCkuc3BsaXQoIiAiKTsKaW50IHZhbHVlPUludGVnZXIudmFsdWVPZihtWzFdKTsKaW50W10gdj1uZXcgaW50W0ludGVnZXIudmFsdWVPZihtWzBdKV07CmlmKEludGVnZXIudmFsdWVPZihtWzBdKT4yMCl7ClN5c3RlbS5vdXQucHJpbnRsbigiTm8iKTsKYnJlYWs7Cn0KZm9yKGludCBpPTA7aTxJbnRlZ2VyLnZhbHVlT2YobVswXSk7aSsrKXsKaW50IGN2ID1JbnRlZ2VyLnBhcnNlSW50KHMucmVhZExpbmUoKSk7CmlmKGN2PjEwMDApewpTeXN0ZW0ub3V0LnByaW50bG4oIk5vIik7CmJyZWFrOwp9ZWxzZXsKdltpXT1jdjsKfQp9CkFycmF5cy5zb3J0KHYpOwovL2ZvcihpbnQgaT12Lmxlbmd0aC0xO2k+PTA7aS0tKXsKLy9TeXN0ZW0ub3V0LnByaW50bG4oImkgPSAiK2kgKyIgdmFsdWUgPSIrdltpXSk7Ci8vfQpib29sZWFuIGNhPWZhbHNlOwpmb3IoaW50IGk9di5sZW5ndGgtMTtpPj0wO2ktLSl7CiAgICAgICAgICAgIGludCBzdW09MDsKICAgICAgICAgICAgLy9TeXN0ZW0ub3V0LnByaW50bG4oIiAgZnJvbSB2YWx1ZSA9ICIrdltpXSk7CiAgICAgICAgICAgICAgICAgICAgICAgIGZvcihpbnQgaj12Lmxlbmd0aC0xO2o+PTA7ai0tKXsKICAgICAgICAgICAgICAgICAgICAgICAgLy9TeXN0ZW0ub3V0LnByaW50bG4oImNoZWNraW5nIHZhbHVlIDEgPSAiKyBzdW0gKyIgdmFsdWUgMiA9ICIrIHZbal0gKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc3VtPD12YWx1ZSAmJiBzdW0rdltqXTw9dmFsdWUpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2lmKHZbal08PXZhbHVlKQogICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oKTsKICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJhY2N0dWFsIik7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigidmFsdWUgMSA9ICIrIHN1bSArIiB2YWx1ZSAyID0gIisgdltqXSApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdW09c3VtK3Zbal07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiICBzdW0gdmFsdWUgPSAiK3N1bSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICBpZihzdW09PXZhbHVlKXtjYT10cnVlO2JyZWFrO30KfQppZihjYT09dHJ1ZSl7ClN5c3RlbS5vdXQucHJpbnRsbigiWWVzIik7Cn0KZWxzZXsKU3lzdGVtLm91dC5wcmludGxuKCJObyIpOwp9Cgp9Cgp9Cn0=