s(S1,S2) :- np(S1,S3), vp(S3,S4), np(S4,S5), prep(S5,S6),np(S6,S2).
np(S1,S2) :- det(S1,S3), noun(S3,S2).
vp(S1,S2) :- verb(S1,S2).
adj([big|S],S).
noun([man|S],S).
noun([dog|S],S).
noun([ball|S],S).
verb([hits|S],S).
prep([at|S],S).
prep([on|S],S).
prep([into|S],S).
