You are given a string initialCurrency, and you start with 1.0 of initialCurrency.
You are also given four arrays with currency pairs (strings) and rates (real numbers):
pairs1[i] = [startCurrency_i, targetCurrency_i] denotes that you can convert from startCurrency_i to targetCurrency_i at a rate of rates1[i] on day 1.
pairs2[i] = [startCurrency_i, targetCurrency_i] denotes that you can convert from startCurrency_i to targetCurrency_i at a rate of rates2[i] on day 2.
Also, each currency can be converted to itself at a rate of 1.0.
Return the maximum amount of initialCurrency you can have after performing any number of conversions on both days in order.
In the above example, the maximum amount of EUR you can have is 720.00000, which can be achieved by starting with 1.0 EUR, converting to USD (2.0), then to JPY (6.0) on day 1, then converting JPY to USD (24.0), to CHF (120.0), and finally to EUR (720.0) on day 2.
Converting NGN to EUR on day 1 and EUR to NGN on day 2 gives 9.0 / 6.0 = 1.5.
There is no conversion path to return to USD, so the maximum is 1.0.
1 <= initialCurrency.length <= 3
initialCurrency consists only of uppercase English letters.