Given the number n, return a string which shows the minimum number of moves to complete the tower of Hanoi consisting of n layers.
Tower of Hanoi : https://en.wikipedia.org/wiki/Tower_of_Hanoi
Example - 2 layered Tower of Hanoi 
Input: n=2
Start
[[2, 1], [], []]
Goal
[[], [], [2, 1]]
Expected Output : '[[2, 1], [], []]\n[[2], [1], []]\n[[], [1], [2]]\n[[], [], [2, 1]]'
def maketrans(n, a, b, c):
  if n == 0: return []
  return maketrans(n-1, a, c, b) + [[a, b]] + maketrans(n - 1, c, b, a)


def hanoiArray(n):
    transitions = maketrans(n, 0, 2, 1)
    state = [[i for i in range(n, 0, -1)], [], []]
    res = str(state)
    while transitions:
        from_peg, to_peg = transitions.pop(0)
        state[to_peg].append(state[from_peg].pop())
        res += '\n' + str(state)
    return res
def maketrans(n, a, b, c):
  if n == 0: return []
  return maketrans(n-1, a, c, b) + [[a, b]] + maketrans(n - 1, c, b, a)


def hanoiArray(n):
    transitions = maketrans(n, 0, 2, 1)
    state = [[i for i in range(n, 0, -1)], [], []]
    res = str(state)
    while transitions:
        from_peg, to_peg = transitions.pop(0)
        state[to_peg].append(state[from_peg].pop())
        res += '\n' + str(state)
    return res