#SDNU1543. Happy Salted Fish Every Day
Happy Salted Fish Every Day
Description
Salted fish Albert_s is a Sagittarius who will never grow up, especially in front of someone he like. Here's his self-portrait:
One day, he find a wonderful sequence: ……. This sequence consists of and , and its first term equals . Besides, if you see adjacent and equal terms as one group, you will get ……. Count number of terms in every group, you will get the sequence itself. Now, the sequence can be uniquely determined.
Forsaken and Wanderer attracted by this sequence, and they want to know what's the element. Because of something sadness, Albert_s is unable to think now. Would you like to help him?
Format
Input
The first line contains a positive integer T(), denoting the number of test cases.
For each test case:
A single line contains a positive integer n(), denoting the index of the element in the sequence.
Output
For each test case:
A single line contains a nonnegative integer, denoting the answer.
Samples
2
1
2
1
2