# -*- coding: utf-8 -*-
import math

def prime_number_identifier(num):
    for candidate in range(int())
    return True


input_num = int(raw_input())
counter = 0
while counter < input_num:
    candidate_number = int(raw_input())
    if prime_number_identifier(candidate_number):
        print candidate_number
    counter += 1