pan>) =
  <span class="hljs-keyword">var</span>
    d = initDeque[<span class="hljs-built_in">int</span>]()
    p = initIntSet() <span class="hljs-comment">## p stands for packedsets, I tried to use it but I do not have it yet</span>
                     <span class="hljs-comment">## </span>
                     <span class="hljs-comment">## d and p are synchronized to contain same stuff</span>
    n: <span class="hljs-built_in">int</span>
  <span class="hljs-keyword">for</span> i <span class="hljs-keyword"