UVa 608 - Counterfeit Dollar

608 - Counterfeit Dollar

 * UVA:
 * PKU:
 * Nankai:

Summary
Given the results of a sensitive balance scale, determine which coin in a set of 13 is counterfeit and whether it's lighter or heavier.

Gotchas

 * "up", "down" and "even" are not necesarly always lowercase.

Implementations
Since there is always one solution per test, the easiest method is a simple brute force to see which combinations are possible.

Input
1 ABCD EFGH even ABCI EFJK up ABIJ EFGH even

Output
K is the counterfeit coin and it is light.