There are 7 ways to write the integer 4 as a sum of 1, 2, and 3. A sum must use at least one number, and two sums that use the same numbers in a different order count as different ways.
Given an integer n, write a program that finds how many ways there are to write n as a sum of 1, 2, and 3.
The first line contains the number of test cases T. Each test case is one line holding an integer n. n is positive and smaller than 11.
For each test case, print the number of ways to write n as a sum of 1, 2, and 3, one per line.