How to solve STK in python

How solve STK IN Python