You are given a positive integer 'N'. Your task is to return all the prime numbers less than or equal to the 'N'.
Note:
1) A prime number is a number that has only two factors: 1 and the number itself.
2) 1 is not a prime number.
Detailed explanation ( Input/output format, Notes, Images )
Input Format:
The first line contains an integer 'T', which denotes the number of test cases or queries to be run. Then, the 'T' test cases follow.
The first line of each test case contains only one integer 'N', as described in the problem statement.
Output Format:
For each test case, return a sequence of integers denoting the prime number less than or equal to 'N' in the increasing order.
Note:
You do not need to print anything. It has already been taken care of. Just implement the given function.
Sample Input 1:
1
5
Sample Output 1:
2 3 5
Explanation for sample input 1:
2,3 and 5 are the only prime numbers less than or equal to 5.
Sample Input 2:
1
8
Sample Output 2:
2 3 5 7
Explanation for sample input 2:
2,3,5 and 7 are the only prime numbers less than or equal to 8.