Ball coloring
##### Submissions: 300   Accuracy: 45.68%   Difficulty: Easy   Marks: 2

Given N balls . All of them are initially  uncolored . You have to color the balls with two colors RED and BLUE such that there can be atmost 2 positions where a RED ball is touching BLUE ball or vice versa. You have to color all the balls.Find the number of ways in which balls can be colored.

Input:
First line of input contains of an integer 'T' denoting number of test cases. Then T test cases follow. Only line of each test case contains an integer N .

Output:
For each case print an integer corresponding to the answer .

Constraints:
1 <= T <= 1000
1 <= N <= 105

Example:
Input:

2
1
2

Output:

4

Explanation:
Case1: Possible ways to color are {{r},{b}} . So the answer is 2 .

#### ** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Hardik Gulati
Author: hardikgulati96

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.