<p>You are given a string <code>time</code> in the form of <code> hh:mm</code>, where some of the digits in the string are hidden (represented by <code>?</code>).</p>
<p>The valid times are those inclusively between <code>00:00</code> and <code>23:59</code>.</p>
<p>Return <em>the latest valid time you can get from</em><code>time</code><em> by replacing the hidden</em><em>digits</em>.</p>
<strong>Explanation:</strong> The latest hour beginning with the digit '2' is 23 and the latest minute ending with the digit '0' is 50.