import Foundation

class BinaryTreeNode {
    let value: Int
    var left: BinaryTreeNode?
    var right: BinaryTreeNode?
    init(_ value: Int) {
        self.value = value
    }
}
struct BinaryTree {
    var root: BinaryTreeNode?

    func postOrderDisplay(_ node: BinaryTreeNode?) {
        guard let node = node else { return }
        postOrderDisplay(node.left)
        postOrderDisplay(node.right)
        print("\(node.value) ")
    }
}