TC QuantumAlchemy


 * http://www.topcoder.com/stat?c=problem_statement&pm=7540

Summary
You're given a number of chemical reactions on an alphabet of 26 atoms. Each reaction takes 2 or more atoms and produces exactly one atom; and there is at most one way to produce each type of atom. Your task is, given some initial reactants, to figure out whether you can produce a target atom.

From TopCoder Single Round Match 344.

Hints

 * There's essentially only one way to produce the target atom.