Problem: Jack and Jill are sitting at the bottom of their tree house and debating in how many ways then can jump up the stairs on the tree and reach the tree house .Because Jack is older than Jill, He can jump one, two or three stairs in one step while Jill can jump just one or two stairs in one step .
For example, Jack can cover the 8 stairs by jumping (2,2,2,2) or (2,1,2,1,2) or other suitable combinations of steps.
Could you help them to find the total number of possibilities they have to reach the top.
Note that the order of the steps is important here, for example, (3,1) is treated distinct from (1,3)  i. e. jumping 3 stairs in first step followed by jumping 1 stair in other step is different from jumping one stair in first step and 3 stairs in second step.
Write a program to help them out 
Input:
 The number of stairs to be covered.
Output:
Number of total ways to reach to the top for Jack in the first line and Number of total ways to reach at the top for Jill in the second line.
(For other cases, output is ERROR)
Note: if total stairs to be covered are 3
Then, 
For jack total combinations are 4

1 1 1

1 2

2 1

3

For Jill total combinations are 3

1 1 1 

1 2

2 1

SAMPLE INPUT
3

SAMPLE OUTPUT
Jack-4
Jill-3

Solution (in PYTHON):

Solution:
trib = []
def calc_trib(n):
    trib.append(0)
    trib.append(1)
    trib.append(2)
    trib.append(4)
    for i in range(4,n+1):
        temp = (trib[i-1] + trib[i-2] + trib[i-3])
        trib.append(temp)

fib = []
def calc_fib(n):
	fib.append(0)
	fib.append(1)
	fib.append(2)
	for i in range(3,n+1):
		temp1=(fib[i-1]+fib[i-2])
		fib.append(temp1)

N=input()
if N<=0:
	print('ERROR')
else:
	calc_trib(N)
	calc_fib(N)
	print('Jack-'+str(trib[N]))
	print('Jill-'+str(fib[N]))