the input is a collection of currencies and their exchange rates. is there a sequence of exchanges that makes money instantly? for instance, if the currencies are x, y, and z and the exchange rate is 1 x equals 2 ys, 1 y equals 2 zs, and 1 x equals 3 zs, then 300 zs will buy 100 xs, which in turn will buy 200 ys, which in turn will buy 400 zs. we have thus made a profit of 33 percent.