Query Learning Algorithm for Ordered Multi-Terminal Binary Decision Diagrams