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:
i=input()
def stairs1(n):
    if n<=0:
        return "ERROR"
    if n==1:
        return 1
    if n==2:
        return 2
    if n==3:
        return 4

    return stairs1(n-1)+stairs1(n-2)+stairs1(n-3)

def stairs2(n):
    if n<=0:
        return "ERROR"
    if n==1:
        return 1
    if n==2:
        return 2
    
    return stairs2(n-1)+stairs2(n-2)

ans=str(stairs1(i))
if ans=="ERROR":
    print ans
else:
    print "Jack-"+ans

ans=str(stairs2(i))
if ans!="ERROR":
    print "Jill-"+ans