Deserializer (50 points)Please write a Python program which serializes a binary tree (each node contains a character) and deserializes back to the original binary tree with O(n) complexity, where n is the number of nodes in the binary tree. This is useful in transmit data from one site to another using communication network by serializing the data from source site, transmit the serialized data via the network, and then deserializes the data back to the original form. To make your job easier, you can serialize binary tree by generating pre-order traversal sequence from the binary tree and then concatenating the in-order traversal sequence. Then do deserialization on the other site by reconstruct the binary tree accordingly, and print the post-order traversal sequence to verify your code is correct. In theory, you can use either preorder with in-order or use post-order with in-order, but the former one is easier than the latter because the first node in the preorder traversal is the root of the binary tree.Your program should read all t9*.dat in the same directory as your p9.py or p9.ipynb, and generate output for each t9*.dat as the example below.Example Input:abcdefg # pre-ordercbaedfg # in-orderExample Post-order Output:cbegfdaComputer ScienceEngineering & TechnologyPython Programming DATA 200

Order your essay today and save 20% with the discount code ESSAYHELP