template for python problems and maxcount problem