# Hello Choto Bondhu!

AUST CSE 44th Batch Pract...
Limits 1s, 512 MB

Let's play a game. I will give you a number $n$. You will have to tell me $n^2$. Okay, it may seem difficult for you to calculate this huge number. So tell me the last digit of $n^2$. In other words: $n^2 \mod 10$.

## Input

The first line will contain $T$ ($1 ≤ T ≤ 100$), which indicates test cases.

Next $T$ lines will each contain a number $n$ ($1 ≤ n ≤ 10^{100000}$).

## Output

For each cases, print $n^2 \mod 10$.

## Sample

InputOutput
6
1
2
3
4
5
6

1
4
9
6
5
6


When $n = 1$, $ans = (n * n) \mod 10 = 1 \mod 10 = 1$.

When $n = 2$, $ans = (n * n) \mod 10 = 4 \mod 10 = 4$.

When $n = 3$, $ans = (n * n) \mod 10 = 9 \mod 10 = 9$.

When $n = 4$, $ans = (n * n) \mod 10 = 16 \mod 10 = 6$.

When $n = 5$, $ans = (n * n) \mod 10 = 25 \mod 10 = 5$.

When $n = 6$, $ans = (n * n) \mod 10 = 36 \mod 10 = 6$.