// Arup Guha
// 7/20/2015
// Solution to 2010 UCF Fall Locals Problem: Binarize

import java.util.*;

public class binarize {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int numCases = stdin.nextInt();

		// Process all cases.
		for (int loop=0; loop<numCases; loop++) {
			int n = stdin.nextInt();
			System.out.println("Input value: "+n);

			// Left shift until we get to a big enough number.
			int res = 1;
			while (res < n) res <<= 1;
			System.out.println(res);
			System.out.println();
		}
	}
}