39th Python exercise