How would you implement an interface that performs currency exchange?
Implement currency_exchange(rates, queries), where each rate [source, target, multiplier] means one unit of source equals multiplier units of target. Return each converted amount rounded to six decimal places, or None when no conversion path exists. Conversions may use reverse rates and multiple intermediate currencies.
def currency_exchange(rates, queries):