Given a positive integer N, write a program to find the last digit of the N'th term from the Fibonnaci series and print it.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow.
The first line of each test case contains a positive integer N.
Print out the last digit of N'th Fibonacci number.
1 <= T <= 100
0 < N <= 1000
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.