import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution{ public static int prime(long b){ int p=0; for(int n=2;n1){ var = prime(a[x]); if(var==1){ s=(long)Math.pow(2,count)+a[x]; break;} else if(a[x]%2==0){ s=s+a[x]/2; a[x]=a[x]/2; count++; } } System.out.print(s +" "); } } } public static void main(String args[]){ Scanner in=new Scanner(System.in); int n=in.nextInt(); long[] a=new long[n]; for(int a_i=0;a_i