Update A.py

The aim of this problem is to extend the notion of a level order traversal as follows.
Along with a binary tree T, you are given a integer number d that is at least 1.
A d-wise level order traversal of T is defined as follows :
Starting with the root of T, traverse the nodes up to depth d in a preorder manner,
and then use level order on the remaining nodes at level d+1.
This rule is to be applied recursively. If d = 1, this is the standard level order traversal.