import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for (int z = 0; z < t; z++) { long n = sc.nextLong(); System.out.println(root(n, 2)); } sc.close(); } static int root(long x, int n) { int ng = 1000000001; int ok = 1; while (ng - ok > 1) { int mid = (ok + ng) / 2; if (Math.pow(mid, n) < Long.MAX_VALUE) { ok = mid; } else { ng = mid; } } ng = ok + 1; ok = 1; while (ng - ok > 1) { int mid = (ok + ng) / 2; if (power(mid, n) <= x) { ok = mid; } else { ng = mid; } } return ok; } static long power(long x, long n) { if (n == 0) { return 1; } long val = power(x, n / 2); val = val * val; if (n % 2 == 1) { val = val * x; } return val; } }