     return old;
 }
 
-class Queue<T>
-{
-    var head:Element<T>?;
+class Queue<T: AnyObject>
+{
+    var head:Element<T>?
     var tail:Element<T>?
     
     init()

    }
}

func ==<T>(lhs: Element<T>, rhs: Element<T>) -> Bool
{
    return ObjectIdentifier(lhs) == ObjectIdentifier(rhs);
}

postfix func ++<T>(inout e: Element<T>?) -> Element<T>?

    
    deinit
    {
    }
    
}

class PQueue<T where T: AnyObject, T:Priority> : Queue<T>
{
    var maximum:Int? {
        get {
