문제링크 : https://www.acmicpc.net/problem/9461
import sys
input = lambda : sys.stdin.readline().rstrip()
d = [1,1,1,2]
def solving(n):
for _ in range(n): d.append(0)
if d[n] > 0: return d[n-1]
for i in range(1,n):
d[i+3] = d[i] + d[i+1]
return d[n-1]
for _ in range(int(input())):
print(solving(int(input())))