sovle 1 by python