import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long s = in.nextLong();
        int number;
        long sum = 0;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            number = in.nextInt();
            sum += number;
            if (number < min) {
                min = number;
            }
        }
        long d = sum - n*min;
        if (sum < s) {
            System.out.println(-1);
        } else if(sum == s) {
            System.out.println(0);
        } else {
            if (s < d) {
                System.out.println(min);
            }
            s -= d;
            if (s < n) {
                System.out.println(min - 1);
            }
            else if (s % n == 0) {
                System.out.println(min - s/n);
            } else {
                System.out.println(min - s/n - 1);
            }
        }
    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int s = in.nextInt();
        int arr[] = new int[n];
        int sum = 0;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
            sum += arr[i];
            if (arr[i] < min) {
                min = arr[i];
            }
        }
        if (sum < s) {
            System.out.println(-1);
        } else if(sum == s) {
            System.out.println(0);
        } else {
            s -= sum - n*min;
            if (s < 0) {
                System.out.println(min);
            }
            else if (s % n == 0) {
                System.out.println(min - s/n);
            } else {
                System.out.println(min - s/n - 1);
            }
        }
    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long s = in.nextLong();
        int number;
        long sum = 0;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            number = in.nextInt();
            sum += number;
            if (number < min) {
                min = number;
            }
        }
        long d = sum - n*min;
        if (sum < s) {
            System.out.println(-1);
        } else if(sum == s) {
            System.out.println(0);
        } else {
            if (s < d) {
                System.out.println(min);
            } else {
                s -= d;
                if (s < n) {
                    System.out.println(min - 1);
                } else if (s % n == 0) {
                    System.out.println(min - s / n);
                } else {
                    System.out.println(min - s / n - 1);
                }
            }
        }
    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long s = in.nextLong();
        int numbers[] = new int[n];
        long sum = 0;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            numbers[i] = in.nextInt();
            sum += numbers[i];
            if (numbers[i] < min) {
                min = numbers[i];
            }
        }
        if (sum < s) {
            System.out.println(-1);
        } else if(sum == s) {
            System.out.println(0);
        } else {
            s -= sum - n*min;
            if (s < 0) {
                System.out.println(min);
            }
            else if (s % n == 0) {
                System.out.println(min - s/n);
            } else {
                System.out.println(min - s/n - 1);
            }
        }
    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int s = in.nextInt();
        int arr[] = new int[n];
        int sum = 0;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
            sum += arr[i];
            if (arr[i] < min) {
                min = arr[i];
            }
        }
        if (sum < s) {
            System.out.println(-1);
        } else if(sum == s) {
            System.out.println(0);
        } else {
            s -= sum - n*min;
            if (s % n == 0) {
                System.out.println(min - s/n);
            } else {
                System.out.println(min - s/n - 1);
            }
        }
    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long s = in.nextLong();
        int arr[] = new int[n];
        long sum = 0;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
            sum += arr[i];
            if (arr[i] < min) {
                min = arr[i];
            }
        }
        if (sum < s) {
            System.out.println(-1);
        } else if(sum == s) {
            System.out.println(0);
        } else {
            s -= sum - n*min;
            if (s < 0) {
                System.out.println(min);
            }
            else if (s % n == 0) {
                System.out.println(min - s/n);
            } else {
                System.out.println(min - s/n - 1);
            }
        }
    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long s = in.nextLong();
        int number;
        long sum = 0;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            number = in.nextInt();
            sum += number;
            if (number < min) {
                min = number;
            }
        }
        long d = sum - n*min;
        if (sum < s) {
            System.out.println(-1);
        } else if(sum == s) {
            System.out.println(0);
        } else {
            if (s < d) {
                System.out.println(min);
            }
            s -= d;
            if (s < n) {
                System.out.println(min - 1);
            }
            if (s % n == 0) {
                System.out.println(min - s/n);
            } else {
                System.out.println(min - s/n - 1);
            }
        }
    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long s = in.nextLong();
        long number;
        long sum = 0;
        long min = Long.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            number = in.nextLong();
            sum += number;
            if (number < min) {
                min = number;
            }
        }
        long d = sum - n*min;
        if (sum < s) {
            System.out.println(-1);
        } else if(sum == s) {
            System.out.println(0);
        } else {
            s -= d;
            if (s < 0) {
                System.out.println(min);
            } else if (s % n == 0) {
                System.out.println(min - s/n);
            } else {
                System.out.println(min - s/n - 1);
            }
        }
    }
}


/* package whatever; // don't place package name! */

// your code goes here/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(st.nextToken()),i;
		long c=Long.parseLong(st.nextToken()),k=10000000001,j=0;
		st=new StringTokenizer(br.readLine());
		long[] a=new long[n];
		for(i=0;i<n;i++)
		{
			a[i]=Long.parseLong(st.nextToken());
		}
		Arrays.sort(a);
		k=a[0];
		//ArrayUtils.reverse(a);
		for(i=n-1;i>=0;i--)
		{
			if(a[i]>k)
			j+=a[i]-k;
			if(j>=c)
			{
				System.out.println(k);
				System.exit(0);
			}
		}

		c=c-j;
		if(k*n<c)
		System.out.println(-1);
		else
		{
			System.out.println(k-((c/(long)n)+(c%(long)n)));
		}
	}
}


/* package whatever; // don't place package name! */

// your code goes here/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(st.nextToken()),i,j=0,k=1000000000;
		long c=Long.parseLong(st.nextToken());
		st=new StringTokenizer(br.readLine());
		int[] a=new int[n];
		for(i=0;i<n;i++)
		{
			a[i]=Integer.parseInt(st.nextToken());
		}
		Arrays.sort(a);
		k=a[0];
		//ArrayUtils.reverse(a);
		for(i=n-1;i>0;i--)
		{
			j+=a[i]-k;
			if(j>=c)
			{
				System.out.println(k);
				System.exit(0);
			}
		}

		c=c-j;
		if(k*n<c)
		System.out.println(-1);
		else
		{
			System.out.println(k-((c/n)+(c%n)));
		}
	}
}


/* package whatever; // don't place package name! */

// your code goes here/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(st.nextToken()),i;
		long c=Long.parseLong(st.nextToken()),k=1000000005,j=0;
		st=new StringTokenizer(br.readLine());
		long[] a=new long[n];
		for(i=0;i<n;i++)
		{
			a[i]=Long.parseLong(st.nextToken());
		}
		Arrays.sort(a);
		k=a[0];
		//ArrayUtils.reverse(a);
		for(i=n-1;i>=0;i--)
		{
			if(a[i]>k)
			j+=a[i]-k;
			if(j>=c)
			{
				System.out.println(k);
				System.exit(0);
			}
		}

		c=c-j;
		if(k*n<c)
		System.out.println(-1);
		else
		{
			System.out.println(k-((c/(long)n)+(c%(long)n)));
		}
	}
}


/* package whatever; // don't place package name! */

// your code goes here/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(st.nextToken()),i;
		long c=Long.parseLong(st.nextToken()),k=1000000005,j=0;
		st=new StringTokenizer(br.readLine());
		long[] a=new long[n];
		for(i=0;i<n;i++)
		{
			a[i]=Long.parseLong(st.nextToken());
		}
		Arrays.sort(a);
		k=a[0];
		//ArrayUtils.reverse(a);
		for(i=n-1;i>=0;i--)
		{
			if(a[i]>k)
			j+=a[i]-k;
			if(j>=c)
			{
				System.out.println(k);
				System.exit(0);
			}
		}

		c=c-j;
		if(k*n<c)
		System.out.println(-1);
		else
		{
			System.out.println(k-(s+n-1)/n);
		}
	}
}


import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(st.nextToken()),i;
		long c=Long.parseLong(st.nextToken()),k=1000000005,j=0;
		st=new StringTokenizer(br.readLine());
		long[] a=new long[n];
		for(i=0;i<n;i++)
		{
			a[i]=Long.parseLong(st.nextToken());
		}
		Arrays.sort(a);
		k=a[0];
		//ArrayUtils.reverse(a);
		for(i=n-1;i>=0;i--)
		{
			if(a[i]>k)
			j+=a[i]-k;
			if(j>=c)
			{
				System.out.println(k);
				System.exit(0);
			}
		}

		c=c-j;
		if(k*n<c)
		System.out.println(-1);
		else
		{
			System.out.println(k-(c+n-1)/n);
		}
	}
}


/* package whatever; // don't place package name! */

// your code goes here/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(st.nextToken()),i;
		long c=Long.parseLong(st.nextToken()),k=1000000001,j=0;
		st=new StringTokenizer(br.readLine());
		long[] a=new long[n];
		for(i=0;i<n;i++)
		{
			a[i]=Long.parseLong(st.nextToken());
		}
		Arrays.sort(a);
		k=a[0];
		//ArrayUtils.reverse(a);
		for(i=n-1;i>=0;i--)
		{
			if(a[i]>k)
			j+=a[i]-k;
			if(j>=c)
			{
				System.out.println(k);
				System.exit(0);
			}
		}

		c=c-j;
		if(k*n<c)
		System.out.println(-1);
		else
		{
			System.out.println(k-((c/(long)n)+(c%(long)n)));
		}
	}
}


/* package whatever; // don't place package name! */

// your code goes here/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(st.nextToken()),i,j=0;
		long c=Long.parseLong(st.nextToken()),k=1000000001;
		st=new StringTokenizer(br.readLine());
		long[] a=new long[n];
		for(i=0;i<n;i++)
		{
			a[i]=Long.parseLong(st.nextToken());
		}
		Arrays.sort(a);
		k=a[0];
		//ArrayUtils.reverse(a);
		for(i=n-1;i>0;i--)
		{
			j+=a[i]-k;
			if(j>=c)
			{
				System.out.println(k);
				System.exit(0);
			}
		}

		c=c-j;
		if(k*n<c)
		System.out.println(-1);
		else
		{
			System.out.println(k-((c/(long)n)+(c%(long)n)));
		}
	}
}


/* package whatever; // don't place package name! */

// your code goes here/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(st.nextToken()),i;
		long c=Long.parseLong(st.nextToken()),k=1000000005,j=0;
		st=new StringTokenizer(br.readLine());
		long[] a=new long[n];
		for(i=0;i<n;i++)
		{
			a[i]=Long.parseLong(st.nextToken());
		}
		Arrays.sort(a);
		k=a[0];
		//ArrayUtils.reverse(a);
		for(i=n-1;i>=0;i--)
		{
			if(a[i]>k)
			j+=a[i]-k;
			if(j>=c)
			{
				System.out.println(k);
				System.exit(0);
			}
		}

		c=c-j;
		if(k*n<c)
		System.out.println(-1);
		else
		{
			System.out.println(k-(c-n+1)/n);
		}
	}
}


/* package whatever; // don't place package name! */

// your code goes here/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(st.nextToken()),i,j=0;
		long c=Long.parseLong(st.nextToken()),k=1000000001;
		st=new StringTokenizer(br.readLine());
		long[] a=new long[n];
		for(i=0;i<n;i++)
		{
			a[i]=Long.parseLong(st.nextToken());
		}
		Arrays.sort(a);
		k=a[0];
		//ArrayUtils.reverse(a);
		for(i=n-1;i>0;i--)
		{
			j+=a[i]-k;
			if(j>=c)
			{
				System.out.println(k);
				System.exit(0);
			}
		}

		c=c-j;
		if(k*n<c)
		System.out.println(-1);
		else
		{
			System.out.println(k-((c/n)+(c%n)));
		}
	}
}


import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;
import java.io.InputStream ;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Stack;
import java.util.TreeSet;
import java.util.Collections;
import java.math.*;

public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(System.out);
        //Scanner sc = new Scanner();
        Reader in = new Reader();
        Main solver = new Main();
        solver.solve(out, in);
        out.flush();
        out.close();

    }

    static int maxn = (int)1e6+1;
    static int mod = (int)1e9+7;
    static int arr[],a[],b[],dp[][];
    static double[] p;
    static int n,m,c,x,t,ans;
    static long k;

    void solve(PrintWriter out, Reader in) throws IOException{
        n = in.nextInt();
        k = in.nextLong();

        arr = new int[n];
        for(int i=0 ;i<n ;i++) arr[i] = in.nextInt();

        ans = -1;
        bs();

        out.println(ans);

    }

    static void bs(){
    	int lo=0, hi=(int)1e9, res=-1, mid,temp=0;

            while(lo <= hi){
                mid = (lo+hi)>>1;
                if(check(mid)) { lo = mid + 1; res = mid; }
                else { hi = mid -1; }
            }
        ans = res;
    }

    static boolean check(int d){
        long sum=0L;
        for(int i=0 ;i<n;i++) {
            if(arr[i]>d)    sum+=arr[i]-d;
        }
        return sum>=k;
    }

    static class Reader {

        private InputStream mIs;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public Reader() {
            this(System.in);
        }

        public Reader(InputStream is) {
            mIs = is;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();

        }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = mIs.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }
}


import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;
import java.io.InputStream ;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Stack;
import java.util.TreeSet;
import java.util.Collections;
import java.math.*;

public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(System.out);
        //Scanner sc = new Scanner();
        Reader in = new Reader();
        Main solver = new Main();
        solver.solve(out, in);
        out.flush();
        out.close();

    }

    static int maxn = (int)1e6+1;
    static int mod = (int)1e9+7;
    static int arr[],a[],b[],dp[][];
    static double[] p;
    static int n,m,c,x,t,ans;
    static long k;

    void solve(PrintWriter out, Reader in) throws IOException{
        n = in.nextInt();
        k = in.nextLong();

        arr = new int[n];
        for(int i=0 ;i<n ;i++) arr[i] = in.nextInt();

        ans = -1;
        bs();

        out.println(ans);

    }

    static void bs(){
    	int lo=0, hi=(int)1e9, res=-1, mid,temp=0;

            while(lo <= hi){
                mid = (lo+hi)>>1;
                if(check(mid)) { lo = mid + 1; res = mid; }
                else { hi = mid -1; }
            }
        ans = res;
    }

    static boolean check(int d){
        long sum=0L;
        for(int i=0 ;i<n;i++) {
            if(arr[i]>=d)    sum+=arr[i]-d;
            else return false;
        }
        return sum>=k;
    }

    static class Reader {

        private InputStream mIs;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public Reader() {
            this(System.in);
        }

        public Reader(InputStream is) {
            mIs = is;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();

        }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = mIs.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }
}


import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;
import java.io.InputStream ;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Stack;
import java.util.TreeSet;
import java.util.Collections;
import java.math.*;

public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(System.out);
        //Scanner sc = new Scanner();
        Reader in = new Reader();
        Main solver = new Main();
        solver.solve(out, in);
        out.flush();
        out.close();

    }

    static int maxn = (int)1e6+1;
    static int mod = (int)1e9+7;
    static int arr[],a[],b[],dp[][];
    static double[] p;
    static int n,m,k,c,x,t,ans;

    void solve(PrintWriter out, Reader in) throws IOException{
        n = in.nextInt();
        k = in.nextInt();

        arr = new int[n];
        for(int i=0 ;i<n ;i++) arr[i] = in.nextInt();

        ans = -1;
        bs();

        out.println(ans);

    }

    static void bs(){
    	int lo=0, hi=(int)1e9, res=-1, mid,temp=0;

            while(lo <= hi){
                mid = (lo+hi)>>1;
                if(check(mid)) { lo = mid + 1; res = mid; }
                else { hi = mid -1; }
            }
        ans = res;
    }

    static boolean check(int d){
        long sum=0L;
        for(int i=0 ;i<n;i++) {
            if(arr[i]>d)    sum+=arr[i]-d;
        }
        return sum>=k;
    }

    static class Reader {

        private InputStream mIs;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public Reader() {
            this(System.in);
        }

        public Reader(InputStream is) {
            mIs = is;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();

        }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = mIs.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }
}


import java.util.*;
public class fe{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int s=sc.nextInt();
		int a[]=new int[n];
		int t=0,c=0,i;
		for(i=0;i<n;i++){
			a[i]=sc.nextInt();
			t=t+a[i];
		}
		if(t<s){
			System.out.println("-1");
		}
		else{
			while(c!=s){
				Arrays.sort(a);
				int x=a[n-1]-a[n-2];
				//System.out.println(a[n-1]);
				if(x>0&&c+x<=s)
				{
				c=c+x;
				a[n-1]=a[n-1]-x;
			}
			else if(c+x>s){
				a[n-1]=a[n-1]-(c-s);
				break;
			}
			else{
				a[n-1]=a[n-1]-1;
				c++;
			}
			}
			Arrays.sort(a);
			System.out.println(a[0]);
		}
	}
}


import java.util.*;
public class fe{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int s=sc.nextInt();
		int a[]=new int[n];
		int t=0,c=0,i;
		for(i=0;i<n;i++){
			a[i]=sc.nextInt();
			t=t+a[i];
		}
		if(t<s){
			System.out.println("-1");
		}
		else{
			int l=(t-s)/n;
			int min=l;
			for(i=0;i<n;i++){
				min=Math.min(min,a[i]);
			}
			System.out.println(min);
			}
	}
}


import java.util.*;
public class fe{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int s=sc.nextInt();
		int a[]=new int[n];
		int t=0,c=0,i;
		for(i=0;i<n;i++){
			a[i]=sc.nextInt();
			t=t+a[i];
		}
		if(t<s){
			System.out.println("-1");
		}
		else{
			Arrays.sort(a);
			int u=a[0];
			for(i=n-1;i>=0;i--){
				if(c+a[i]-u<s)
				{
				a[i]=a[i]-(a[i]-u);
				c=c+a[i]-u;
			}
			else{
				a[i]=a[i]-(c-s);
				c=c+c-s;
				break;
			}
			}
			Arrays.sort(a);
			System.out.println(a[0]);
			}
	}
}


import java.util.*;
public class fe{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong();
		long s=sc.nextLong();
		long a[]=new long[(int)n];
		long t=0,c=0,i;
		for(i=0;i<n;i++){
			a[(int)i]=sc.nextLong();
			t=t+a[(int)i];
		}
		if(t<s){
			System.out.println("-1");
		}
		else{
			while(c!=s){
				Arrays.sort(a);
				a[(int)n-1]=a[(int)n-1]-1;
				//System.out.println(a[n-1]);
				c++;
			}
			Arrays.sort(a);
			System.out.println(a[0]);
		}
	}
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int vis[(1<<14)+2];
int main()
{
    vector<int>v,v2;
    for(int i=0; i<(1<<14); i++)
    {
        int fg = 0;
        for(int j=0; j<7; j++)
        {
            fg|=(i&(1<<j));
        }
        if(!fg)
        {
            v.push_back(i);
            vis[i] = 1;
        }
        if(v.size()==100)
            break;
    }
    for(int i=0; i<(1<<14); i++)
    {
        int fg = 0;
        for(int j=7; j<14; j++)
        {
            fg|=(i&(1<<j));
        }
        if(!fg && vis[i]==0)
        {
            v2.push_back(i);
        }
        if(v2.size()==100)
            break;
    }
    int x,ans = 0;
    cout << "?";
    for(auto u : v)
        cout << " " << u;
    cout << endl;
    //fflush(stdout);
    cin >> x;
    for(int j=0; j<7; j++)
    {
        ans|=(x&(1<<j));
    }

    cout << "?";
    for(auto u : v2)
        cout << " " << u;
    cout << endl;
    //fflush(stdout);
    cin >> x;
    for(int j=7; j<14; j++)
    {
        ans|=(x&(1<<j));
    }
    cout << "! " << ans << "\n";
    //fflush(stdout);
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int vis[(1<<14)+2];
int main()
{
    vector<int>v,v2;
    for(int i=0; i<(1<<14); i++)
    {
        int fg = 0;
        for(int j=0; j<7; j++)
        {
            fg|=(i&(1<<j));
        }
        if(!fg)
        {
            v.push_back(i);
            vis[i] = 1;
        }
        if(v.size()==100)
            break;
    }
    for(int i=0; i<(1<<14); i++)
    {
        int fg = 0;
        for(int j=7; j<14; j++)
        {
            fg|=(i&(1<<j));
        }
        if(!fg && vis[i]==0)
        {
            v2.push_back(i);
        }
        if(v2.size()==100)
            break;
    }
    int x,ans = 0;
    cout << "?";
    for(auto u : v)
        cout << " " << u;
    cout << endl;
    fflush(stdout);
    cin >> x;
    for(int j=0; j<7; j++)
    {
        //ans|=(x&(1<<j));
        if((x&(1<<j)))
        {
            ans+=(1<<j);
        }
    }

    cout << "?";
    for(auto u : v2)
        cout << " " << u;
    cout << endl;
    fflush(stdout);
    cin >> x;
    for(int j=7; j<14; j++)
    {
        //ans|=(x&(1<<j));
        if((x&(1<<j)))
        {
            ans+=(1<<j);
        }
    }
    cout << "! " << ans << endl;
    fflush(stdout);
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int vis[(1<<14)+2];
int main()
{
    vector<int>v,v2;
    for(int i=0; i<(1<<14); i++)
    {
        int fg = 0;
        for(int j=0; j<7; j++)
        {
            fg|=(i&(1<<j));
        }
        if(!fg)
        {
            v.push_back(i);
            vis[i] = 1;
        }
        if(v.size()==100)
            break;
    }
    for(int i=0; i<(1<<14); i++)
    {
        int fg = 0;
        for(int j=7; j<14; j++)
        {
            fg|=(i&(1<<j));
        }
        if(!fg && vis[i]==0)
        {
            v2.push_back(i);
        }
        if(v2.size()==100)
            break;
    }
    int x,ans = 0;
    cout << "?";
    for(auto u : v)
        cout << " " << u;
    cout << "\n";
    //fflush(stdout);
    cin >> x;
    for(int j=0; j<7; j++)
    {
        ans|=(x&(1<<j));
    }

    cout << "?";
    for(auto u : v2)
        cout << " " << u;
    cout << "\n";
    //fflush(stdout);
    cin >> x;
    for(int j=7; j<14; j++)
    {
        ans|=(x&(1<<j));
    }
    cout << "! " << ans << endl;
    //fflush(stdout);
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int vis[(1<<14)+2];
int main()
{
    vector<int>v,v2;
    for(int i=0; i<(1<<14); i++)
    {
        int fg = 1;
        for(int j=0; j<7; j++)
        {
            fg&=(i&(1<<j));
        }
        if(fg)
        {
            v.push_back(i);
            vis[i] = 1;
        }
        if(v.size()==100)
            break;
    }
    for(int i=0; i<(1<<14); i++)
    {
        int fg = 1;
        for(int j=7; j<14; j++)
        {
            fg&=(i&(1<<j));
        }
        if(fg && vis[i]==0)
        {
            v2.push_back(i);
            vis[i] = 1;
        }
        if(v2.size()==100)
            break;
    }
    int x,ans = 0;
    cout << "?";
    for(auto u : v)
        cout << " " << u;
    cout << endl;
    fflush(stdout);
    cin >> x;
    for(int j=0; j<7; j++)
    {
        if((x&(1<<j))==0)
        {
            ans|=(1<<j);
        }
    }

    cout << "?";
    for(auto u : v)
        cout << " " << u;
    cout << endl;
    fflush(stdout);
    cin >> x;
    for(int j=7; j<14; j++)
    {
        if((x&(1<<j))==0)
        {
            ans|=(1<<j);
        }
    }
    cout << "! " << ans << endl;
    fflush(stdout);
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int vis[(1<<14)+2];
int main()
{
    vector<int>v,v2;
    for(int i=0; i<(1<<14); i++)
    {
        int fg = 0;
        for(int j=0; j<7; j++)
        {
            fg|=(i&(1<<j));
        }
        if(!fg)
        {
            v.push_back(i);
            vis[i] = 1;
        }
        if(v.size()==100)
            break;
    }
    for(int i=0; i<(1<<14); i++)
    {
        int fg = 0;
        for(int j=7; j<14; j++)
        {
            fg|=(i&(1<<j));
        }
        if(!fg && vis[i]==0)
        {
            v2.push_back(i);
        }
        if(v2.size()==100)
            break;
    }
    int x,ans = 0;
    cout << "?";
    for(auto u : v)
        cout << " " << u;
    cout << endl;
    fflush(stdout);
    cin >> x;
    for(int j=0; j<7; j++)
    {
        ans|=((x&(1<<j));
    }

    cout << "?";
    for(auto u : v2)
        cout << " " << u;
    cout << endl;
    fflush(stdout);
    cin >> x;
    for(int j=7; j<14; j++)
    {
        ans|=((x&(1<<j));
    }
    cout << "! " << ans << endl;
    fflush(stdout);
    return 0;
}


#include<bits/stdc++.h>
#define RD1(x) scanf("%d",&x)
#define RD2(x,y) scanf("%d %d",&x,&y)
#define RD3(x,y,z) scanf("%d %d %d",&x,&y,&z)
#define RDL1(x) scanf("%ulld",&x)
#define RDL2(x,y) scanf("%ulld %ulld",&x,&y)
#define RDL3(x,y,z) scanf("%ulld %ulld %ulld",&x,&y,&z)
#define CLR(x) memset(x,0,sizeof(x))
#define NEG(x) memset(x,0xff,sizeof(x))
#define maxm (1111+10)
#define maxn (200000+5)
#define lson (rt<<1)
#define rson (rt<<1|1)
#define mod (233)
#define pi acos(-1)
#define eps 1e-14
#define acc ios::sync_with_stdio(false);cin.tie(0)
#define inf 0x3f3f3f3f
#define INF(x) memset(x,inf,sizeof(x))
#define CLRQ(Q) while(!(Q).empty())(Q).pop()
#define see(x) (cerr<<(#x)<<'='<<(x)<<' ')
#define NL cout<<endl
#define pii pair<int,int>
#define fi freopen("C:\\Users\\Administrator\\Desktop\\in","r",stdin)
#define fo freopen("C:\\Users\\Administrator\\Desktop\\out","w",stdout)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	cout<<'?'; for(int i=1;i<=100;i++)cout<<' '<<i;cout<<endl;fflush(stdout);
	int ret;cin>>ret;for(int i=0;i<7;i++)if(ret&1<<i)ret^=1<<i;
	cout<<'?'; for(int i=1;i<=100;i++)cout<<' '<<(i<<7);cout<<endl;fflush(stdout);
	int ret1;cin>>ret1;for(int i=7;i<13;i++)if(ret1&1<<i)ret^=1<<i;
	cout<<"! "<<(ret1|ret);fflush(stdout);
	return 0;
}


#include<bits/stdc++.h>
#define RD1(x) scanf("%d",&x)
#define RD2(x,y) scanf("%d %d",&x,&y)
#define RD3(x,y,z) scanf("%d %d %d",&x,&y,&z)
#define RDL1(x) scanf("%ulld",&x)
#define RDL2(x,y) scanf("%ulld %ulld",&x,&y)
#define RDL3(x,y,z) scanf("%ulld %ulld %ulld",&x,&y,&z)
#define CLR(x) memset(x,0,sizeof(x))
#define NEG(x) memset(x,0xff,sizeof(x))
#define maxm (1111+10)
#define maxn (200000+5)
#define lson (rt<<1)
#define rson (rt<<1|1)
#define mod (233)
#define pi acos(-1)
#define eps 1e-14
#define acc ios::sync_with_stdio(false);cin.tie(0)
#define inf 0x3f3f3f3f
#define INF(x) memset(x,inf,sizeof(x))
#define CLRQ(Q) while(!(Q).empty())(Q).pop()
#define see(x) (cerr<<(#x)<<'='<<(x)<<' ')
#define NL cout<<endl
#define pii pair<int,int>
#define fi freopen("C:\\Users\\Administrator\\Desktop\\in","r",stdin)
#define fo freopen("C:\\Users\\Administrator\\Desktop\\out","w",stdout)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	cout<<'?'; for(int i=1;i<=100;i++)cout<<' '<<i;cout<<endl;fflush(stdout);
	int ret;cin>>ret;ret=ret>>7<<7;
	cout<<'?'; for(int i=0,j=1<<7;i<100;i++)cout<<' '<<(i+j);cout<<endl;fflush(stdout);
	int ret1;cin>>ret1;ret1=ret1<<7>>7;
	cout<<(ret1|ret);fflush(stdout);
	return 0;
}


#include<bits/stdc++.h>
#define RD1(x) scanf("%d",&x)
#define RD2(x,y) scanf("%d %d",&x,&y)
#define RD3(x,y,z) scanf("%d %d %d",&x,&y,&z)
#define RDL1(x) scanf("%ulld",&x)
#define RDL2(x,y) scanf("%ulld %ulld",&x,&y)
#define RDL3(x,y,z) scanf("%ulld %ulld %ulld",&x,&y,&z)
#define CLR(x) memset(x,0,sizeof(x))
#define NEG(x) memset(x,0xff,sizeof(x))
#define maxm (1111+10)
#define maxn (200000+5)
#define lson (rt<<1)
#define rson (rt<<1|1)
#define mod (233)
#define pi acos(-1)
#define eps 1e-14
#define acc ios::sync_with_stdio(false);cin.tie(0)
#define inf 0x3f3f3f3f
#define INF(x) memset(x,inf,sizeof(x))
#define CLRQ(Q) while(!(Q).empty())(Q).pop()
#define see(x) (cerr<<(#x)<<'='<<(x)<<' ')
#define NL cout<<endl
#define pii pair<int,int>
#define fi freopen("C:\\Users\\Administrator\\Desktop\\in","r",stdin)
#define fo freopen("C:\\Users\\Administrator\\Desktop\\out","w",stdout)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	cout<<'?';
	for(int i=1;i<=100;i++)cout<<' '<<i;
	cout<<endl;
	fflush(stdout);
	ll ret;cin>>ret;
	for(ll i=1;i<=100;i++)
	{
		ll tmp=i^ret;if(!tmp)
		{
			cout<<"! "<<i;fflush(stdout);
			return 0;
		}
	}
	cout<<'?';
	for(int i=1;i<=100;i++)cout<<' '<<(i^ret);
	cout<<endl;
	fflush(stdout);
	ll ret1;cin>>ret1;
	for(ll i=1;i<=100;i++)
	{
		ll tmp=i^ret^ret1;if(!tmp)
		{
			cout<<"! "<<(i^ret);fflush(stdout);
			return 0;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
#define RD1(x) scanf("%d",&x)
#define RD2(x,y) scanf("%d %d",&x,&y)
#define RD3(x,y,z) scanf("%d %d %d",&x,&y,&z)
#define RDL1(x) scanf("%ulld",&x)
#define RDL2(x,y) scanf("%ulld %ulld",&x,&y)
#define RDL3(x,y,z) scanf("%ulld %ulld %ulld",&x,&y,&z)
#define CLR(x) memset(x,0,sizeof(x))
#define NEG(x) memset(x,0xff,sizeof(x))
#define maxm (1111+10)
#define maxn (200000+5)
#define lson (rt<<1)
#define rson (rt<<1|1)
#define mod (233)
#define pi acos(-1)
#define eps 1e-14
#define acc ios::sync_with_stdio(false);cin.tie(0)
#define inf 0x3f3f3f3f
#define INF(x) memset(x,inf,sizeof(x))
#define CLRQ(Q) while(!(Q).empty())(Q).pop()
#define see(x) (cerr<<(#x)<<'='<<(x)<<' ')
#define NL cout<<endl
#define pii pair<int,int>
#define fi freopen("C:\\Users\\Administrator\\Desktop\\in","r",stdin)
#define fo freopen("C:\\Users\\Administrator\\Desktop\\out","w",stdout)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	cout<<'?'; for(int i=1;i<=100;i++)cout<<' '<<i;cout<<endl;fflush(stdout);
	int ret;cin>>ret;for(int i=0;i<7;i++)if(ret&1<<i)ret^=1<<i;
	cout<<'?'; for(int i=1;i<=100;i++)cout<<' '<<(i<<7);cout<<endl;fflush(stdout);
	int ret1;cin>>ret1;for(int i=7;i<13;i++)if(ret1&1<<i)ret1^=1<<i;
	cout<<"! "<<(ret1|ret);fflush(stdout);
	return 0;
}


#include<bits/stdc++.h>
#define RD1(x) scanf("%d",&x)
#define RD2(x,y) scanf("%d %d",&x,&y)
#define RD3(x,y,z) scanf("%d %d %d",&x,&y,&z)
#define RDL1(x) scanf("%ulld",&x)
#define RDL2(x,y) scanf("%ulld %ulld",&x,&y)
#define RDL3(x,y,z) scanf("%ulld %ulld %ulld",&x,&y,&z)
#define CLR(x) memset(x,0,sizeof(x))
#define NEG(x) memset(x,0xff,sizeof(x))
#define maxm (1111+10)
#define maxn (200000+5)
#define lson (rt<<1)
#define rson (rt<<1|1)
#define mod (233)
#define pi acos(-1)
#define eps 1e-14
#define acc ios::sync_with_stdio(false);cin.tie(0)
#define inf 0x3f3f3f3f
#define INF(x) memset(x,inf,sizeof(x))
#define CLRQ(Q) while(!(Q).empty())(Q).pop()
#define see(x) (cerr<<(#x)<<'='<<(x)<<' ')
#define NL cout<<endl
#define pii pair<int,int>
#define fi freopen("C:\\Users\\Administrator\\Desktop\\in","r",stdin)
#define fo freopen("C:\\Users\\Administrator\\Desktop\\out","w",stdout)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	cout<<'?'; for(int i=1;i<=100;i++)cout<<' '<<i;cout<<endl;fflush(stdout);
	int ret;cin>>ret;for(int i=0;i<7;i++)if(ret&1<<i)ret^=1<<i;
	cout<<'?'; for(int i=0,j=1<<7;i<100;i++)cout<<' '<<(i+j);cout<<endl;fflush(stdout);
	int ret1;cin>>ret1;for(int i=7;i<13;i++)if(ret1&1<<i)ret^=1<<i;
	cout<<"! "<<(ret1|ret);fflush(stdout);
	return 0;
}


#include<bits/stdc++.h>
#define RD1(x) scanf("%d",&x)
#define RD2(x,y) scanf("%d %d",&x,&y)
#define RD3(x,y,z) scanf("%d %d %d",&x,&y,&z)
#define RDL1(x) scanf("%ulld",&x)
#define RDL2(x,y) scanf("%ulld %ulld",&x,&y)
#define RDL3(x,y,z) scanf("%ulld %ulld %ulld",&x,&y,&z)
#define CLR(x) memset(x,0,sizeof(x))
#define NEG(x) memset(x,0xff,sizeof(x))
#define maxm (1111+10)
#define maxn (200000+5)
#define lson (rt<<1)
#define rson (rt<<1|1)
#define mod (233)
#define pi acos(-1)
#define eps 1e-14
#define acc ios::sync_with_stdio(false);cin.tie(0)
#define inf 0x3f3f3f3f
#define INF(x) memset(x,inf,sizeof(x))
#define CLRQ(Q) while(!(Q).empty())(Q).pop()
#define see(x) (cerr<<(#x)<<'='<<(x)<<' ')
#define NL cout<<endl
#define pii pair<int,int>
#define fi freopen("C:\\Users\\Administrator\\Desktop\\in","r",stdin)
#define fo freopen("C:\\Users\\Administrator\\Desktop\\out","w",stdout)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	cout<<'?'; for(int i=1;i<=100;i++)cout<<' '<<i;cout<<endl;fflush(stdout);
	int ret;cin>>ret;for(int i=0;i<7;i++)if(ret&1<<i)ret^=1<<i;
	cout<<'?'; for(int i=0,j=1<<7;i<100;i++)cout<<' '<<(i+j);cout<<endl;fflush(stdout);
	int ret1;cin>>ret1;for(int i=7;i<13;i++)if(ret1&1<<i)ret^=1<<i;
	cout<<(ret1|ret);fflush(stdout);
	return 0;
}


#include<bits/stdc++.h>
#define RD1(x) scanf("%d",&x)
#define RD2(x,y) scanf("%d %d",&x,&y)
#define RD3(x,y,z) scanf("%d %d %d",&x,&y,&z)
#define RDL1(x) scanf("%ulld",&x)
#define RDL2(x,y) scanf("%ulld %ulld",&x,&y)
#define RDL3(x,y,z) scanf("%ulld %ulld %ulld",&x,&y,&z)
#define CLR(x) memset(x,0,sizeof(x))
#define NEG(x) memset(x,0xff,sizeof(x))
#define maxm (1111+10)
#define maxn (200000+5)
#define lson (rt<<1)
#define rson (rt<<1|1)
#define mod (233)
#define pi acos(-1)
#define eps 1e-14
#define acc ios::sync_with_stdio(false);cin.tie(0)
#define inf 0x3f3f3f3f
#define INF(x) memset(x,inf,sizeof(x))
#define CLRQ(Q) while(!(Q).empty())(Q).pop()
#define see(x) (cerr<<(#x)<<'='<<(x)<<' ')
#define NL cout<<endl
#define pii pair<int,int>
#define fi freopen("C:\\Users\\Administrator\\Desktop\\in","r",stdin)
#define fo freopen("C:\\Users\\Administrator\\Desktop\\out","w",stdout)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
	cout<<'?'; for(int i=1;i<=100;i++)cout<<' '<<i;cout<<endl;fflush(stdout);
	int ret;cin>>ret;
	ret&=((1<<7)-1)<<7;
	cout<<'?'; for(int i=1;i<=100;i++)cout<<' '<<(i<<7);cout<<endl;fflush(stdout);
	int ret1;cin>>ret1;
	ret1&=(1<<7)-1;
	cout<<"! "<<(ret1|ret);fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;
#define pb push_back
#define db(x) cerr << #x << " = " << x << endl;
#define INF 0x3f3f3f3f
#define fi first
#define se second
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define vii vector<pii>

int main()
{
	cout << "?";
	for (int i = 128; i > 28 ; i--)
	{
		cout << " " << i;
	}
	cout << endl;
	int res;
	cin >> res;
	res &= 16256;
	cout << "?";
	for (int i = 128; i > 28 ; i--)
	{
		cout << " " << (i << 7);
	}
	cout << endl;
	int res2;
	cin >> res2;
	res2 &= 127;
	cout << "! " << (res | res2) << endl;
}


#include <bits/stdc++.h>

using namespace std;
#define pb push_back
#define db(x) cerr << #x << " = " << x << endl;
#define INF 0x3f3f3f3f
#define fi first
#define se second
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define vii vector<pii>

int main()
{
	cout << "?";
	for (int i = 128; i >= 28 ; i--)
	{
		cout << " " << i;
	}
	cout << endl;
	int res;
	cin >> res;
	res &= 16256;
	cout << "?";
	for (int i = 128; i >= 28 ; i--)
	{
		cout << " " << (i << 7);
	}
	cout << endl;
	int res2;
	cin >> res2;
	res &= 127;
	cout << "! " << (res | res2) << endl;
}


#include <bits/stdc++.h>

using namespace std;
#define pb push_back
#define db(x) cerr << #x << " = " << x << endl;
#define INF 0x3f3f3f3f
#define fi first
#define se second
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define vii vector<pii>

int main()
{
	cout << "?";
	for (int i = 127; i > 27 ; i--)
	{
		cout << " " << i;
	}
	cout << endl;
	int res;
	cin >> res;
	res &= 16256;
	cout << "?";
	for (int i = 127; i > 27 ; i--)
	{
		cout << " " << (i << 7);
	}
	cout << endl;
	int res2;
	cin >> res2;
	res2 &= 127;
	cout << "! " << (res | res2) << endl;
}


#include <bits/stdc++.h>

using namespace std;
#define pb push_back
#define db(x) cerr << #x << " = " << x << endl;
#define INF 0x3f3f3f3f
#define fi first
#define se second
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define vii vector<pii>

int main()
{
	printf("?");
	for (int i = 128; i >= 28 ; i--)
	{
		printf(" %d", i);
	}
	int res;
	scanf("%d", &res);
	res >>= 7;
	res <<= 7;
	for (int i = 128; i >= 28 ; i--)
	{
		printf(" %d", i << 7);
	}
	int res2;
	scanf("%d", &res2);
	res2 <<= 7;
	res2 >>= 7;
	printf("! %d", res | res2);
}


#include <bits/stdc++.h>

using namespace std;
#define pb push_back
#define db(x) cerr << #x << " = " << x << endl;
#define INF 0x3f3f3f3f
#define fi first
#define se second
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define vii vector<pii>

int main()
{
	cout << "?";
	for (int i = 128; i > 28 ; i--)
	{
		cout << " " << i;
	}
	cout << endl;
	int res;
	cin >> res;
	res &= 16256;
	cout << "?";
	for (int i = 128; i > 28 ; i--)
	{
		cout << " " << (i << 7);
	}
	cout << endl;
	int res2;
	cin >> res2;
	res &= 127;
	cout << "! " << (res | res2) << endl;
}


#include <bits/stdc++.h>

using namespace std;
#define pb push_back
#define db(x) cerr << #x << " = " << x << endl;
#define INF 0x3f3f3f3f
#define fi first
#define se second
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define vii vector<pii>

int main()
{
	cout << "?";
	for (int i = 128; i >= 28 ; i--)
	{
		cout << " " << i;
	}
	cout << endl;
	int res;
	cin >> res;
	res >>= 7;
	res <<= 7;
	for (int i = 128; i >= 28 ; i--)
	{
		cout << " " << (i << 7);
	}
	cout << endl;
	int res2;
	cin >> res2;
	res2 <<= 7;
	res2 >>= 7;
	cout << "! " << (res | res2) << endl;
}


#include <bits/stdc++.h>

using namespace std;
#define pb push_back
#define db(x) cerr << #x << " = " << x << endl;
#define INF 0x3f3f3f3f
#define fi first
#define se second
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define vii vector<pii>

int main()
{
	cout << "?";
	for (int i = 128; i >= 28 ; i--)
	{
		cout << " " << i;
	}
	cout << endl;
	int res;
	cin >> res;
	res >>= 7;
	res <<= 7;
	cout << "?";
	for (int i = 128; i >= 28 ; i--)
	{
		cout << " " << (i << 7);
	}
	cout << endl;
	int res2;
	cin >> res2;
	res2 <<= 7;
	res2 >>= 7;
	cout << "! " << (res | res2) << endl;
}


#include <bits/stdc++.h>
using namespace std;
#define inta long long
#define ii pair<int,int>
#define mp make_pair
#define pb push_back

int main()
{
	ios_base::sync_with_stdio(0);

	int arr[100];
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=i;
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	int x,y,ans=0;
	cin>>x;
	cout<<"?";
	for(int i=1;i<=100;i++)
	{
		int a=0;
		a+=(i<<7);
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	cin>>y;
	for(int i=0;i<7;i++)
	{
		if(!(x&(1<<(i+7)))) ans+=(1<<(i+7));
		if(!(y&(1<<i))) ans+=(1<<i);
	}
	cout<<"! "<<ans<<endl;
	fflush(stdout);

}


#include <bits/stdc++.h>
using namespace std;
#define inta long long
#define ii pair<int,int>
#define mp make_pair
#define pb push_back

int main()
{
	ios_base::sync_with_stdio(0);

	int arr[100];
	cout<<"? ";
	for(int i=0;i<100;i++)
	{
		int a=i;
		cout<<a<<" ";
	}
	cout<<endl;
	fflush(stdout);
	int x,y,ans=0;
	cin>>x;
	for(int i=0;i<100;i++)
	{
		int a=0;
		a+=(i<<7);
		cout<<a<<" ";
	}
	cout<<endl;
	fflush(stdout);
	cin>>y;
	for(int i=0;i<7;i++)
	{
		if(!(x&(1<<(i+7)))) ans+=(1<<(i+7));
		if(!(x&(1<<i))) ans+=(1<<i);
	}
	cout<<ans<<endl;
	fflush(stdout);

}


#include <bits/stdc++.h>
using namespace std;
#define inta long long
#define ii pair<int,int>
#define mp make_pair
#define pb push_back

int main()
{
	ios_base::sync_with_stdio(0);

	int arr[100];
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=i;
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	int x,y,ans=0;
	cin>>x;
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=125;
		a+=(i<<7);
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	cin>>y;
	for(int i=0;i<7;i++)
	{
		if(!(x&(1<<(i+7)))) ans+=(1<<(i+7));
		if(!(x&(1<<i))) ans+=(1<<i);
	}
	cout<<"! "<<ans<<endl;
	fflush(stdout);

}


#include <bits/stdc++.h>
using namespace std;
#define inta long long
#define ii pair<int,int>
#define mp make_pair
#define pb push_back

int main()
{
	ios_base::sync_with_stdio(0);

	int arr[100];
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=i;
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	int x,y,ans=0;
	cin>>x;
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=125;
		a+=(i<<7);
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	cin>>y;
	for(int i=0;i<7;i++)
	{
		if(!(x&(1<<(i+7)))) ans+=(1<<(i+7));
		if(!(y&(1<<i))) ans+=(1<<i);
	}
	cout<<"! "<<ans<<endl;
	fflush(stdout);

}


#include <bits/stdc++.h>
using namespace std;
#define inta long long
#define ii pair<int,int>
#define mp make_pair
#define pb push_back

int main()
{
	ios_base::sync_with_stdio(0);

	int arr[100];
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=i;
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	int x,y,ans=0;
	cin>>x;
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=125;
		a+=(i<<7);
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	cin>>y;
	for(int i=0;i<7;i++)
	{
		if(!(x&(1<<(i+7)))) ans+=(1<<(i+7));
		if(!(x&(1<<i))) ans+=(1<<i);
	}
	cout<<ans<<endl;
	fflush(stdout);

}


#include <bits/stdc++.h>
using namespace std;
#define inta long long
#define ii pair<int,int>
#define mp make_pair
#define pb push_back

int main()
{
	ios_base::sync_with_stdio(0);

	int arr[100];
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=i;
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	int x,y,ans=0;
	cin>>x;
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=125;
		a+=(i<<7);
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	cin>>y;
	for(int i=0;i<7;i++)
	{
		if(!(y&(1<<(i+7)))) ans+=(1<<(i+7));
		if(!(x&(1<<i))) ans+=(1<<i);
	}
	cout<<"! "<<ans<<endl;
	fflush(stdout);

}


#include <bits/stdc++.h>
using namespace std;
#define inta long long
#define ii pair<int,int>
#define mp make_pair
#define pb push_back

int main()
{
	ios_base::sync_with_stdio(0);

	int arr[100];
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=i;
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	int x,y,ans=0;
	cin>>x;
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=0;
		a+=(i<<7);
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	cin>>y;
	for(int i=0;i<7;i++)
	{
		if(!(x&(1<<(i+7)))) ans+=(1<<(i+7));
		if(!(x&(1<<i))) ans+=(1<<i);
	}
	cout<<ans<<endl;
	fflush(stdout);

}


#include <bits/stdc++.h>
using namespace std;
#define inta long long
#define ii pair<int,int>
#define mp make_pair
#define pb push_back

int main()
{
	ios_base::sync_with_stdio(0);

	int arr[100];
	cout<<"?";
	for(int i=0;i<100;i++)
	{
		int a=i;
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	int x,y,ans=0;
	cin>>x;
	cout<<"?";
	for(int i=1;i<=100;i++)
	{
		int a=0;
		a+=(i<<7);
		cout<<" "<<a;
	}
	cout<<endl;
	fflush(stdout);
	cin>>y;
	for(int i=0;i<7;i++)
	{
		if((x&(1<<(i+7)))) ans+=(1<<(i+7));
		if((y&(1<<i))) ans+=(1<<i);
	}
	cout<<"! "<<ans<<endl;
	fflush(stdout);

}


#include <bits/stdc++.h>
using namespace std;
#define inta long long
#define ii pair<int,int>
#define mp make_pair
#define pb push_back

int main()
{
	ios_base::sync_with_stdio(0);

	int arr[100];
	cout<<"? ";
	for(int i=0;i<100;i++)
	{
		int a=i;
		cout<<a<<" ";
	}
	cout<<endl;
	fflush(stdout);
	int x,y,ans=0;
	cin>>x;
	for(int i=0;i<100;i++)
	{
		int a=0;
		a+=(i<<7);
		cout<<a<<" ";
	}
	cout<<endl;
	fflush(stdout);
	cin>>y;
	for(int i=0;i<7;i++)
	{
		if(!(x&(1<<i+7))) ans+=(1<<i+7);
		if(!(x&(1<<i))) ans+=(1<<i);
	}

}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	fast;
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val++;
	}

// 	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

// 	cout << endl;
	fflush(stdout);

	cin >> res;
	res = res & (1 << 7);
	ans ^= res;

	cout << "! " << ans << endl;
	fflush(stdout);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val += 128;
	}

	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;
	fflush(stdout);

	cin >> res;
	ll tmp = ((1 << 14) - 1) ^ ((1 << 7) - 1));
	res = res & tmp;
	ans ^= res;

	cout << "! " << ans << endl;
	fflush(stdout);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	fast;
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val+= 128;
	}

// 	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

// 	cout << endl;
	fflush(stdout);

	cin >> res;
	res = res & (1 << 7);
	ans ^= res;

	cout << "! " << ans;
	fflush(stdout);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	fast;
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;
	fflush(stdout);

	cin >> res;
	res = res & (1 << 7);
	ans ^= res;

	cout << "! " << ans << endl;
	fflush(stdout);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val+= 128;
	}

	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;
	fflush(stdout);

	cin >> res;
	res = res & (1 << 7);
	ans ^= res;

	cout << "! " << ans << endl;
	fflush(stdout);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
    fast;
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val += 128;
	}

	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;
	fflush(stdout);

	cin >> res;
	ll tmp = (((1 << 14) - 1) ^ ((1 << 7) - 1));
	res = res & tmp;
	ans ^= res;

	cout << "! " << ans << endl;
	fflush(stdout);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val+= 128;
	}

// 	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

// 	cout << endl;
	fflush(stdout);

	cin >> res;
	res = res & (1 << 7);
	ans ^= res;

	cout << "! " << ans;
	fflush(stdout);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	fast;
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;
	fflush(stdout);

	cin >> res;
	res = res & (1 << 7);
	ans ^= res;

	cout << "! " << ans << endl;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val += 128;
	}

	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;
	fflush(stdout);

	cin >> res;
	ll tmp = (((1 << 14) - 1) ^ ((1 << 7) - 1));
	res = res & tmp;
	ans ^= res;

	cout << "! " << ans << endl;
	fflush(stdout);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	fast;
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;
	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;
	cin >> res;
	res = res & (1 << 7);
	ans ^= res;

	cout << "! " << ans << endl;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val += 128;
	}

	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;
	fflush(stdout);

	cin >> res;
	res = res ^ ((1 << 7) - 1);
	ans ^= res;

	cout << "! " << ans << endl;
	fflush(stdout);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
	fast;
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val++;
	}

// 	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

// 	cout << endl;
	fflush(stdout);

	cin >> res;
	res = res & (1 << 7);
	ans ^= res;

	cout << "! " << ans;
	fflush(stdout);
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)

const int mod = 1e9+7;
const int N = 1e5+5;

int main(){
    fast;
	ll ans = 0;

	cout << "? ";
	ll itr = 100;

	ll val = (1 << 7);
	while(itr--){
	    cout << val << " ";
	    val += 128;
	}

	cout << endl;

	fflush(stdout);

	ll res = 0; cin >> res;
	res = res & ((1 << 7) - 1);
	ans ^= res;

	cout << "? ";

	itr = 100;

	val = 1;

	while(itr--){
	    cout << val << " ";
	    val++;
	}

	cout << endl;
	fflush(stdout);

	cin >> res;
	ll tmp = (((1 << 14) - 1) ^ ((1 << 7) - 1));
	res = res & tmp;
	ans ^= res;

	cout << "! " << ans << endl;
	fflush(stdout);
}


/*input

*/

#include <bits/stdc++.h>
using namespace std;
#define si(x)       scanf("%d",&x)
#define sll(x)       scanf("%lld",&x)
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define ll          long long int
#define pb          push_back
#define pii         pair<int,int>
#define pll         pair<long long,long long>
#define pil         pair<int,long long>
#define pli         pair<long long,int>
#define vi          vector<int>
#define vl          vector<long long>
#define M           1000000007

void solve(){
	vl v;
	for(int i=1;i<=100;i++){
		v.pb(i);
	}

	cout<<"?";
	for(auto e: v){
		cout<<" "<<e;
	}
	cout<<endl;
	cout.flush();
	ll x1;
	cin>>x1;

	cout<<"?";
	for(auto e: v){
		cout<<" "<<(e<<7);
	}
	cout<<endl;
	cout.flush();
	ll x2;
	cin>>x2;

	ll ans=0;
	for(int i=0;i<=13;i++){
		if(i<=6){
			if(x2&(1ll<<i)) ans+=(1ll<<i);
		}
		else if(x1&(1ll<<i)) ans+=(1ll<<i);
	}

	cout<<"! "<<ans<<endl;

}

int main(){
	int nt=1;
	//si(nt);
	while(nt--){
		solve();
	}
}


/*input

*/

#include <bits/stdc++.h>
using namespace std;
#define si(x)       scanf("%d",&x)
#define sll(x)       scanf("%lld",&x)
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define ll          long long int
#define pb          push_back
#define pii         pair<int,int>
#define pll         pair<long long,long long>
#define pil         pair<int,long long>
#define pli         pair<long long,int>
#define vi          vector<int>
#define vl          vector<long long>
#define M           1000000007

void solve(){
	cout<<"? "<<endl;
	cout.flush();
 	for(int i=1;i<=100;i++){
 		cout<<1<<" ";
 		cout.flush();
 	}
 	ll x1;
 	cin>>x1;
 	cout<<"? "<<endl;
 	cout.flush();
 	for(int i=1;i<=100;i++){
 		cout<<2<<" ";
 		cout.flush();
 	}
 	ll x2;
 	cin>>x2;
 	if(x2&1){
 		cout<<"! "<<x1+1<<endl;
 	}
 	else{
 		cout<<"! "<<x1-1<<endl;
 	}
}

int main(){
	int nt=1;
	//si(nt);
	while(nt--){
		solve();
	}
}


/*input

*/

#include <bits/stdc++.h>
using namespace std;
#define si(x)       scanf("%d",&x)
#define sll(x)       scanf("%lld",&x)
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define ll          long long int
#define pb          push_back
#define pii         pair<int,int>
#define pll         pair<long long,long long>
#define pil         pair<int,long long>
#define pli         pair<long long,int>
#define vi          vector<int>
#define vl          vector<long long>
#define M           1000000007

void solve(){
	vl v;
	for(int i=1;i<=100;i++){
		v.pb(i);
	}

	cout<<"?";
	for(auto e: v){
		cout<<" "<<e;
	}
	cout<<endl;
	cout.flush();
	ll x1;
	cin>>x1;

	cout<<"?";
	for(auto e: v){
		cout<<" "<<(e<<7);
	}
	cout<<endl;
	cout.flush();
	ll x2;
	cin>>x2;

	ll ans=0;
	for(int i=0;i<=13;i++){
		if(i<=6){
			if(x2&(1ll<<i)) ans+=(1ll<<i);
		}
		else if(x1&(1ll<<i)) ans+=(1ll<<i);
	}

	cout<<ans<<endl;

}

int main(){
	int nt=1;
	//si(nt);
	while(nt--){
		solve();
	}
}


/*input

*/

#include <bits/stdc++.h>
using namespace std;
#define si(x)       scanf("%d",&x)
#define sll(x)       scanf("%lld",&x)
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define ll          long long int
#define pb          push_back
#define pii         pair<int,int>
#define pll         pair<long long,long long>
#define pil         pair<int,long long>
#define pli         pair<long long,int>
#define vi          vector<int>
#define vl          vector<long long>
#define M           1000000007

void solve(){
	vl v;
	for(int i=1;i<=100;i++){
		v.pb(i);
	}

	cout<<"? ";
	for(auto e: v){
		cout<<e<<" ";
	}
	cout<<endl;
	cout.flush();
	ll x1;
	cin>>x1;

	cout<<"? ";
	for(auto e: v){
		cout<<(e<<7)<<" ";
	}
	cout<<endl;
	cout.flush();
	ll x2;
	cin>>x2;

	ll ans=0;
	for(int i=0;i<=13;i++){
		if(i<=6){
			if(x2&(1ll<<i)) ans+=(1ll<<i);
		}
		else if(x1&(1ll<<i)) ans+=(1ll<<i);
	}

	cout<<ans<<endl;

}

int main(){
	int nt=1;
	//si(nt);
	while(nt--){
		solve();
	}
}


/*input

*/

#include <bits/stdc++.h>
using namespace std;
#define si(x)       scanf("%d",&x)
#define sll(x)       scanf("%lld",&x)
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define ll          long long int
#define pb          push_back
#define pii         pair<int,int>
#define pll         pair<long long,long long>
#define pil         pair<int,long long>
#define pli         pair<long long,int>
#define vi          vector<int>
#define vl          vector<long long>
#define M           1000000007

void solve(){
	vl v;
	for(int i=1;i<=100;i++){
		v.pb(i);
	}
	ll k=0;
	ll k1=0;
	for(ll i=7;i<=13;i++){
		k += (1ll<<i);
		k1 += (1ll<<(i-7));
	}

	cout<<"? ";
	for(auto e: v){
		cout<<e+k<<" ";
		cout.flush();
	}
	ll x1;
	cin>>x1;

	cout<<"? ";
	for(auto e: v){
		cout<<((e<<7)+k1)<<" ";
		cout.flush();
	}
	ll x2;
	cin>>x2;

	ll ans=0;
	for(int i=0;i<=13;i++){
		if(i<=6){
			if(x2&(1ll<<i)) ans+=(1ll<<i);
		}
		else if(x1&(1ll<<i)) ans+=(1ll<<i);
	}
	cout<<ans<<endl;

}

int main(){
	int nt=1;
	//si(nt);
	while(nt--){
		solve();
	}
}


/*input

*/

#include <bits/stdc++.h>
using namespace std;
#define si(x)       scanf("%d",&x)
#define sll(x)       scanf("%lld",&x)
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define ll          long long int
#define pb          push_back
#define pii         pair<int,int>
#define pll         pair<long long,long long>
#define pil         pair<int,long long>
#define pli         pair<long long,int>
#define vi          vector<int>
#define vl          vector<long long>
#define M           1000000007

void solve(){
	vl v;
	for(int i=1;i<=100;i++){
		v.pb(i);
	}
	ll k=0;
	ll k1=0;
	for(ll i=7;i<=13;i++){
		k += (1ll<<i);
		k1 += (1ll<<(i-7));
	}

	cout<<"? ";
	for(auto e: v){
		cout<<e+k<<" ";
		cout.flush();
	}
	cout<<endl;
	ll x1;
	cin>>x1;

	cout<<"? ";
	for(auto e: v){
		cout<<((e<<7)+k1)<<" ";
		cout.flush();
	}
	cout<<endl;
	ll x2;
	cin>>x2;

	ll ans=0;
	for(int i=0;i<=13;i++){
		if(i<=6){
			if(x2&(1ll<<i)) ans+=(1ll<<i);
		}
		else if(x1&(1ll<<i)) ans+=(1ll<<i);
	}

	cout<<ans<<endl;

}

int main(){
	int nt=1;
	//si(nt);
	while(nt--){
		solve();
	}
}


#include <bits/stdc++.h>

#define fi first
#define se second
#define ll long long

using namespace std;

const int N = 5e3 + 7;
const int mod = 1e9 + 7;

void solve1()
{
    int x = (1 << 8);
    int ans = 0;
    int ans1 = 0;
    cout << "?";
    for( int i = 1; i <= 100; i++ ){
        cout << " " << (i << 7);
    }
    cout << endl;
    int y;
    cin >> y;
    for( int i = 0; i < 7; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << i;
    }
    cout << endl;
    cin >> y;
    for( int i = 8; i <= 14; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "! " << ans;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0); srand(time(0));
    //freopen( "input.txt" , "r" , stdin );
    //freopen( "output.txt" , "w" , stdout );

    int cghf = 1;//cin >> cghf;
    while( cghf-- ){
        solve1();
    }
}


#include <bits/stdc++.h>

#define fi first
#define se second
#define ll long long

using namespace std;

const int N = 5e3 + 7;
const int mod = 1e9 + 7;

void solve1()
{
    int x = (1 << 8);
    int ans = 0;
    int ans1 = 0;
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << (i << 7);
    }
    cout << endl;
    int y;
    cin >> y;
    for( int i = 0; i < 8; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << i;
    }
    cout << endl;
    cin >> y;
    for( int i = 8; i < 14; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "! " << ans;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0); srand(time(0));
    //freopen( "input.txt" , "r" , stdin );
    //freopen( "output.txt" , "w" , stdout );

    int cghf = 1;//cin >> cghf;
    while( cghf-- ){
        solve1();
    }
}


#include <bits/stdc++.h>

#define fi first
#define se second
#define ll long long

using namespace std;

const int N = 5e3 + 7;
const int mod = 1e9 + 7;

void solve1()
{
    int x = (1 << 8);
    int ans = 0;
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << x + i;
    }
    cout << endl;
    int y;
    cin >> y;
    for( int i = 0; i < 7; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << i;
    }
    cout << endl;
    cin >> y;
    for( int i = 7; i < 14; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "! " << ans;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0); srand(time(0));
    //freopen( "input.txt" , "r" , stdin );
    //freopen( "output.txt" , "w" , stdout );

    int cghf = 1;//cin >> cghf;
    while( cghf-- ){
        solve1();
    }
}


#include <bits/stdc++.h>

#define fi first
#define se second
#define ll long long

using namespace std;

const int N = 5e3 + 7;
const int mod = 1e9 + 7;

void solve1()
{
    int x = (1 << 7);
    int ans = 0;
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << x + i;
    }
    cout << endl;
    int y;
    cin >> y;
    for( int i = 0; i < 7; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << i;
    }
    cout << endl;
    cin >> y;
    for( int i = 7; i < 14; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "! " << ans;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0); srand(time(0));
    //freopen( "input.txt" , "r" , stdin );
    //freopen( "output.txt" , "w" , stdout );

    int cghf = 1;//cin >> cghf;
    while( cghf-- ){
        solve1();
    }
}


#include <bits/stdc++.h>

#define fi first
#define se second
#define ll long long

using namespace std;

const int N = 5e3 + 7;
const int mod = 1e9 + 7;

void solve1()
{
    int x = (1 << 8);
    int ans = 0;
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << x + i;
    }
    cout << endl;
    int y;
    cin >> y;
    for( int i = 0; i < 8; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << i;
    }
    cout << endl;
    cin >> y;
    for( int i = 8; i < 14; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "! " << ans;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0); srand(time(0));
    //freopen( "input.txt" , "r" , stdin );
    //freopen( "output.txt" , "w" , stdout );

    int cghf = 1;//cin >> cghf;
    while( cghf-- ){
        solve1();
    }
}


#include <bits/stdc++.h>

#define fi first
#define se second
#define ll long long

using namespace std;

const int N = 5e3 + 7;
const int mod = 1e9 + 7;

void solve1()
{
    int x = (1 << 8);
    int ans = 0;
    int ans1 = 0;
    cout << "?";
    for( int i = 1; i <= 100; i++ ){
        cout << " " << (i << 7);
    }
    cout << endl;
    int y;
    cin >> y;
    for( int i = 0; i < 7; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << i;
    }
    cout << endl;
    cin >> y;
    for( int i = 7; i <= 14; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "! " << ans;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0); srand(time(0));
    //freopen( "input.txt" , "r" , stdin );
    //freopen( "output.txt" , "w" , stdout );

    int cghf = 1;//cin >> cghf;
    while( cghf-- ){
        solve1();
    }
}


#include <bits/stdc++.h>

#define fi first
#define se second
#define ll long long

using namespace std;

const int N = 5e3 + 7;
const int mod = 1e9 + 7;

void solve1()
{
    int x = (1 << 8);
    int ans = 0;
    int ans1 = 0;
    cout << "?";
    for( int i = 1; i <= 100; i++ ){
        cout << " " << (i << 7);
    }
    cout << endl;
    int y;
    cin >> y;
    for( int i = 0; i < 8; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "?";
    for( int i = 0; i < 100; i++ ){
        cout << " " << i;
    }
    cout << endl;
    cin >> y;
    for( int i = 8; i < 14; i++ ){
        if( (y & (1 << i)) )ans |= (1 << i);
    }
    cout << "! " << ans;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0); srand(time(0));
    //freopen( "input.txt" , "r" , stdin );
    //freopen( "output.txt" , "w" , stdout );

    int cghf = 1;//cin >> cghf;
    while( cghf-- ){
        solve1();
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int main()
{

    //freopen("powers.in","r",stdin);
    cout<<"?";
    for(int i=0;i<14;i++)
        cout<<" "<<(1<<i);
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
        cout<<" "<<i;
    cout<<endl;
    cout.flush();
    for(int i=1;i<=100;i++)
        cin>>a[i];
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    cout<<"?";
    for(int i=1;i<=100;i++)
        cout<<" "<<i;
    cout<<endl;
    cout.flush();
    for(int i=1;i<=100;i++)
        cin>>a[i];
    cout<<"! "<<res<<endl;
    cout.flush();
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int main()
{

    //freopen("powers.in","r",stdin);
    cout<<"?";
    for(int i=0;i<14;i++)
        cout<<" "<<(1<<i);
    for(int i=4097;i<=4182;i++)
        cout<<" "<<i;
    cout<<endl;
    cout.flush();
    for(int i=1;i<=100;i++)
    {
        cin>>a[i];
        if(a[i]==-1)
            return 0;
    }
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    cout<<"?";
    for(int i=8001;i<=8100;i++)
        cout<<" "<<i;
    cout<<endl;
    cout.flush();
    for(int i=1;i<=100;i++)
    {
        cin>>a[i];
        if(a[i]==-1)
            return 0;
    }
    cout<<"! "<<res<<endl;
    cout.flush();
    return 0;
}


    #include<iostream>
    using namespace std;
    int main(){
    	cout<<"? ";
    	for(int i=0;i<100;i++)cout<<i<<" ";
    	int x;cin>>x;
     x=x/128*128;
    cout<<"? ";
    for(int i=1;i<=100;i++)cout<<128*i<<" ";
    	int y;cin>>y;
    y=y%128;cout<<"! ";
    cout<<x+y;
    }


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int solve(int x,int i)
{

}
int main()
{
    fast;

    //freopen("powers.in","r",stdin);
    cout<<"? ";
    for(int i=0;i<14;i++)
    {
        cout<<(1<<i)<<" ";
    }
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
    {
        cout<<i;
        if(j<86)
            cout<<" ";
        if(j==86)
            cout<<endl;
    }
    fflush(stdout);
    for(int i=1;i<=100;i++)
        cin>>a[i];
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    cout<<"! "<<res<<"\n";
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int main()
{
    fast;

    //freopen("powers.in","r",stdin);
    //cout<<"? ";
    printf("? ");
    for(int i=0;i<14;i++)
    {
        int z=(1<<i);
        //cout<<z<<" ";
        printf("%d ",z);
    }
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
    {
        //cout<<i;
        printf("%d",i);
        //cout<<" ";
        printf(" ");
    }
    fflush(stdout);
    for(int i=1;i<=100;i++)
    {
        scanf("%d",&a[i]);
        //cin>>a[i];
    }
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    //cout<<"! "<<res<<"\n";
    printf("! %d",res);
    fflush(stdout);
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int main()
{
    fast;

    //freopen("powers.in","r",stdin);
    cout<<"?";
    for(int i=0;i<14;i++)
    {
        int z=(1<<i);
        cout<<" "<<z;
    }
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
        cout<<" "<<i;
    cout<<endl;
    fflush(stdout);
    for(int i=1;i<=100;i++)
        cin>>a[i];
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    cout<<"?";
    for(int i=1;i<=100;i++)
        cout<<" "<<i;
    cout<<endl;
    fflush(stdout);
    for(int i=1;i<=100;i++)
        cin>>a[i];
    cout<<"! "<<res<<endl;
    fflush(stdout);
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int solve(int x,int i)
{

}
int main()
{
    fast;

    //freopen("powers.in","r",stdin);
    //cout<<"? ";
    printf("? ");
    for(int i=0;i<14;i++)
    {
        int z=(1<<i);
        //cout<<z<<" ";
        printf("%d ",z);
    }
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
    {
        //cout<<i;
        printf("%d",i);
        if(j<86)
        {
            //cout<<" ";
            printf(" ");
        }
        if(j==86)
        {
            //cout<<endl;
            printf("\n");
        }
    }
    //fflush(stdout);
    for(int i=1;i<=100;i++)
    {
        scanf("%d",&a[i]);
        //cin>>a[i];
    }
    if(a[1]==-1)
        return 0;
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    //cout<<"! "<<res<<"\n";
    printf("! %d\n",res);
    //fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int main()
{
    fast;

    //freopen("powers.in","r",stdin);
    //cout<<"? ";
    printf("? ");
    for(int i=0;i<14;i++)
    {
        int z=(1<<i);
        //cout<<z<<" ";
        printf("%d ",z);
    }
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
    {
        //cout<<i;
        printf("%d",i);
        if(j<86)
        {
            //cout<<" ";
            printf(" ");
        }
        if(j==86)
        {
            //cout<<endl;
            printf("\n");
        }
    }
    //fflush(stdout);
    for(int i=1;i<=100;i++)
    {
        scanf("%d",&a[i]);
        //cin>>a[i];
    }
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    //cout<<"! "<<res<<"\n";
    printf("! %d\n",res);
    //fflush(stdout);
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
/*#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;*/

int a[105];
int main()
{
    fflush(stdout);
    //freopen("powers.in","r",stdin);
    cout<<"?";
    for(int i=0;i<14;i++)
        cout<<" "<<(1<<i);
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
        cout<<" "<<i;
    cout<<endl;
    for(int i=1;i<=100;i++)
        cin>>a[i];
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    cout<<"?";
    for(int i=1;i<=100;i++)
        cout<<" "<<i;
    cout<<endl;
    for(int i=1;i<=100;i++)
        cin>>a[i];
    cout<<"! "<<res<<endl;

}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int solve(int x,int i)
{

}
int main()
{
    fast;

    //freopen("powers.in","r",stdin);
    //cout<<"? ";
    printf("? ");
    for(int i=0;i<14;i++)
    {
        int z=(1<<i);
        //cout<<z<<" ";
        printf("%d ",z);
    }
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
    {
        //cout<<i;
        printf("%d",i);
        if(j<86)
        {
            //cout<<" ";
            printf(" ");
        }
        if(j==86)
        {
            //cout<<endl;
            printf("\n");
        }
    }
    fflush(stdout);
    for(int i=1;i<=100;i++)
    {
        scanf("%d",&a[i]);
        //cin>>a[i];
    }
    if(a[i]==-1)
        return 0;
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    //cout<<"! "<<res<<"\n";
    printf("! %d\n",res);
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int solve(int x,int i)
{

}
int main()
{
    fast;

    //freopen("powers.in","r",stdin);
    //cout<<"? ";
    printf("? ");
    for(int i=0;i<14;i++)
    {
        int z=(1<<i);
        //cout<<z<<" ";
        printf("%d ",z);
    }
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
    {
        //cout<<i;
        printf("%d",i);
        if(j<86)
        {
            //cout<<" ";
            printf(" ");
        }
        if(j==86)
        {
            //cout<<endl;
            printf("\n");
        }
    }
    fflush(stdout);
    for(int i=1;i<=100;i++)
    {
        cin>>a[i];
    }
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    //cout<<"! "<<res<<"\n";
    printf("! %d\n",res);
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int solve(int x,int i)
{

}
int main()
{
    fast;

    //freopen("powers.in","r",stdin);
    //cout<<"? ";
    printf("? ");
    for(int i=0;i<14;i++)
    {
        int z=(1<<i);
        //cout<<z<<" ";
        printf("%d ",z);
    }
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
    {
        //cout<<i;
        printf("%d",i);
        if(j<86)
        {
            //cout<<" ";
            printf(" ");
        }
        if(j==86)
        {
            //cout<<endl;
            printf("\n");
        }
    }
    fflush(stdout);
    for(int i=1;i<=100;i++)
    {
        scanf("%d",&a[i]);
        //cin>>a[i];
    }
    if(a[1]==-1)
        return 0;
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    //cout<<"! "<<res<<"\n";
    printf("! %d\n",res);
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int main()
{

    //freopen("powers.in","r",stdin);
    cout<<"?";
    for(int i=0;i<14;i++)
        cout<<" "<<(1<<i);
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
        cout<<" "<<i;
    cout<<endl;
    cout.flush();
    for(int i=1;i<=100;i++)
    {
        cin>>a[i];
        if(a[i]==-1)
            return 0;
    }
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    cout<<"?";
    for(int i=1;i<=100;i++)
        cout<<" "<<i;
    cout<<endl;
    cout.flush();
    for(int i=1;i<=100;i++)
    {
        cin>>a[i];
        if(a[i]==-1)
            return 0;
    }
    cout<<"! "<<res<<endl;
    cout.flush();
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int solve(int x,int i)
{

}
int main()
{
    fast;

    //freopen("powers.in","r",stdin);
    cout<<"? ";
    for(int i=0;i<14;i++)
    {
        cout<<(1<<i)<<" ";
    }
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
        cout<<i<<" ";
    fflush(stdout);
    for(int i=1;i<=100;i++)
        cin>>a[i];
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))|a[i]);
        if(x==1)
        {
            res+=(1<<(i-1));
        }
    }
    cout<<"! "<<res<<"\n";
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;

int a[105];
int main()
{
    fast;

    //freopen("powers.in","r",stdin);
    //cout<<"? ";
    printf("? ");
    for(int i=0;i<14;i++)
    {
        int z=(1<<i);
        //cout<<z<<" ";
        printf("%d ",z);
    }
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
    {
        //cout<<i;
        printf("%d",i);
        if(j<86)
        {
            //cout<<" ";
            printf(" ");
        }
        if(j==86)
        {
            //cout<<endl;
            printf("\n");
        }
    }
    fflush(stdout);
    for(int i=1;i<=100;i++)
    {
        scanf("%d",&a[i]);
        //cin>>a[i];
    }
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    //cout<<"! "<<res<<"\n";
    printf("! %d\n",res);
    fflush(stdout);
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
/*#define ld long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define fast ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
typedef pair<ll, ll> pli;
typedef pair<int,int> pii;
typedef pair<ld,ld> pld;
#define PI 3.14159265
ll MOD=998244353;
int MX=1e9;
ld pi=3.1415926535;*/

int a[105];
int main()
{
    cout.flush();
    //freopen("powers.in","r",stdin);
    cout<<"?";
    for(int i=0;i<14;i++)
        cout<<" "<<(1<<i);
    for(int i=pow(2,12)+1,j=1;j<=86;j++,i++)
        cout<<" "<<i;
    cout<<endl;
    for(int i=1;i<=100;i++)
        cin>>a[i];
    ll res=0;
    for(int i=1;i<=14;i++)
    {
        int x=((1<<(i-1))&a[i]);
        if(x!=0)
        {
            res+=(1<<(i-1));
        }
    }
    cout<<"?";
    for(int i=1;i<=100;i++)
        cout<<" "<<i;
    cout<<endl;
    for(int i=1;i<=100;i++)
        cin>>a[i];
    cout<<"! "<<res<<endl;

}