URI Online Judge | 2590
# Seven

**Timelimit: 1**

By Ricardo Martins, IFSULDEMINAS Brazil

Chagas is a boy who loves to eat boiled eggs, but he hates math. He hates exponentiation and for some reason does not correctly calculate operations involving the number 7. Knowing this, his friend Caco decided to make a challenge: he wants Chagas to calculate the **N**th power of 7 and say the last digit of that power. If Chagas hit all The questions, I would get 7 boiled eggs. For example, where **N** = 2, the result would be 9, because 7^{2} = 49. The problem is that, depending on the value of **N**, the result of exponentiation can be a very large number. Without ideas, Chagas decided to ask for his help.

Write a program that, given a number, calculate the last digit of the value of 7 raised to that number.

The entry consists of several instances. The first line of the entry contains an integer **T** indicating the number of instances. Each instance is composed of only one row, which contains the integer **N** (0 ≤ **N** ≤ 10^{9}).

For each instance in the entry, print a line containing an integer, the last digit of 7^{N}.

Input Sample | Output Sample |

4 |
7 |