IMP: Implicit multiplication parser Jack likes C programming language, but hates to write expressions like V=a*b*h;
to multiply the values.

He would like to write V=abh; instead,
why should compiler moan about abh symbol being undefined since int a, b, h; are defined, so we can deduce multiplication?

Help him implement a parser that deciphers a single multiplication term,
provided the set of variables defined in current scope is known.

For simplicity, multiplying by number (as in 2*a*b) is not taken into account, only variables appear.

The input is a multiplication term T, fulfilling regexp:

[a-zA-Z_][a-zA-Z_0-9]*


 and a variable set Z  .

A parsing P of the term T over variable set Z is a string fulfilling following:


after removing all occurences of * from P we receive T,
either is a variable name from Z or consists of proper variable names from Z split up by single * characters.


The solution should print all parsings of a term.

Sample:

Vars           a, c, ab, bc
Term           abc
Solution       ab*c, a*bc

Vars           ab, bc
Term           abc
Solution       -

Vars           -
Term           xyz
Solution       -

Vars           xyz
Term           xyz
Solution       xyz

Vars           width, height
Term           widthheight
Solution       width*height

Vars           width, height
Term           widthheightdepth
Solution       -

Vars           aaa, a
Term           aaaa
Solution       aaa*a, a*aaa, a*a*a*a


The input (the list of variables and the term) may be supplied in any way suitable for the language.

The output can be in any sensible form (one parsing per line or a comma-separated list etc.) - but it should be unambiguous and possible to read.

Empty output is acceptable if there is no possible parsing of a term (in the examples I used '-' for clarity).

This is a code golf, so the shortest code wins.
Pyth, 18 chars

mj\*dfqzsTsm^Qkhlz


This solution is adapted from my Interpreting Fish
solution. The problems are actually very similar.

Expects input as such:

aaaa
"a", "aaa"


Gives output like this:

['a*aaa', 'aaa*a', 'a*a*a*a']


Try it here.


sm^Qkhlz: Generates all sequences of variables containing up to the length of the input string number of variables. 
fqzsT: Filters out the variable sequences that match the input string
mj\*d: Inserts the * symbol and prints.