Autodesk Interview Question

implement a Q structure using any language