// Danny Wasserman
// 7/23/2014
// Solution to 2014 SI@UCF Contest Problem: Cubic Volume

import java.util.Scanner;

public class cube {
  public static void main(String[] args) {

    Scanner in = new Scanner(System.in);
    int cases = in.nextInt();

    // Use longs to avoid overflow...
    while (cases-- != 0) {
      long v = in.nextLong();
      System.out.println(v * v * v);
    }
  }
}
