Added problem1.3

learnt deque, some python syntax