incomplete python solution for 12