Leetcode Queue And Stack Python