Transposing sorted hash