def move(n, start, temp, end, count):
    """Move discs around pegs."""
    if n > 0:
        count = move(n - 1, start, end, temp, count)
        if start:
            end[0].append(start[0].pop())
            print('Disk {} moved from {} to {}'.format(n, start[1], end[1]))
            count += 1
        count = move(n - 1, temp, start, end, count)
    return count