#include <iostream>
using namespace std;
 
  // Add supporting structures - expect many structure types 
      // here ... 
 
      typedef struct // part of A
      {
          int month;
          int day;
          int year;
      } date; 
 
      // TODO - add other supporting structures that could be
 
      typedef struct // part of A
      {
      	int hour; 
      	int minute; 
      } raceTime;
 
      typedef struct // J 
      {
      	int purse; 
      	char escridption[200]; 
      	char ageRestriction[30]; 
      	char weightAssignments[30]; 
      	char claimingCondition[50]; 
      	char distance[50]; 
      } condition; 
 
 
      typedef struct // K
      {
      	char name[50]; 
      	int age; 
      	int weight; 
      	raceTime recordTime; 
      	date recordDate; 
      } record; 
 
      typedef struct // 5-6
      {
      	char owner[50]; 		// owner of the horse
      	char silks[20];		// colorful jackets worn by jockeys to identify owner
      	char trainer[50];		// trainer of the horse
      	char trainerStats[50]; // trainer stats showing the starts, wins, places and shows
      } OT_info; // owner and trainer info
 
      typedef struct // 9
      {
      	char medication[3];
      	char equipment[3]; 
      } ME_info; 
 
      typedef struct // 10 - 11
      {
      	char horseColor[10]; 
      	char horseGender[5]; 
      	int horseAge; 
      	char horseSire[50]; // horse's father
      	char horseDam[50];	// horse's mother
      	int carriedWeight;	// total weight including jocket, saddle, etc.
      } bio_info; 
 
      typedef struct // 12
      {
      	char name[50];
      	int experienceYears;
      	int starts; // jackey stats
      	int wins; 
      	int places; 
      	int shows; 
      } jockey;
 
     typedef struct
     {
     	record recordOnTrack;		// record of horse on same surface as today's track
     	record recordOnDirt;		// record of horse on dirt
     	record recordOnWetDirt;		// record of horse on wet dirt
     	record recordOnAllWeather;	// record of horse all weather
     	int winningHorseNumber; 	// 1st place horse number for the race
      	int placeHorseNumber;		// 2nd place horse number for the race
      	int showHorseNumber;		// 3rd place horse number for the race
      	int speedFigure;			// official equibase speed figuer
      	int earnings;				// earnings in every category
      } totals; 
 
     typedef struct	// 18 
     {
     	char dirtTrack[20]; // condition of the dirt track
     	char turfTrack[20]; // condition of the turf track
     } trackCondition; 
 
     typedef struct // 18-23
     {
     	trackCondition trackConditions; // 18
     	char raceDistance[10];			// tells type of race (20) 
     	int daysUnraced;				// days between races that the horse is unraced (21)
     	float fractionalTimes;			// times recorded at specific points of the race (22)
     	char ageLimit[5];				// age limit (23)
     	char horseRestrictions[3];		// 24-25
     	char raceType[10];				// what type of race the event is about
     } raceCondition; 
 
     typedef struct // 29-31
     {
     	int postPosition;		// specific starting gate or stall assigned to horse
     	char calls[20]; 		// specific points during a race where a horse's position is recorded
     	char finalPosition[20]; // final position during each past race 
     } positions; 
 
     typedef struct /// 36 - top three finishers of the race followed by weight followed by margin
     {
     	char firstFinisher[50]; 
     	char secondFinisher[50]; 
     	char thirdFinisher[50];
     } topThreeFinishers; 
 
     typedef struct // 40
     {
     	date workoutDate; 
     	char racetrack[30];
     	trackCondition workoutTrackCondition; 
     	char effort[30]; // breezing or handily 
     	char rank[20]; 
     	raceTime workoutTime; 
     } workoutLine; 
 
 
 
      // used as types for members of the two main structures below
 
 
     // add a structure to store details on each race
 
      typedef struct 
      {
        date raceDate;				// A - the date of the race
        raceTime race_time;			// A - the time of the race
        int raceNumber;				// C - the specific race number identifier
        char trackName[50];			// E - the name of the track where the race was held
		int raceRating;				// G - estimate of what the winner will earn
		char raceType[20];			// I - what type of race the event is about
		condition raceCondition;	// J - conditions of the race
		record trackRecordHolder;	// K - track record holder info
      } race_details;
 
 
 
 
      // add a structure to store details on each horse
 
      struct horse_details_and_past_performance
      {
 
        int programNumber;					// 1 - the program number
        char saddleColor[20];				// 2 - color cloth the horse has under saddle
        char mlOdds[8]; 					// 3 - morning line odds
        int claimingPrice;					// 4 - horse sale price if claimed by new owner
        OT_info horseOT;					// 5-7 - owner and trainer info
        char horseName[50];					// 8 - horse name
        ME_info horseME[3];					// 9/34 - horse medication and equipment
        bio_info horseStats;				// biological information of horse (10-11)
        jockey horseJockey; 				// 12
        int horseClass; 					// 13 - horse class figure
        totals horseTotals; 				// 14 - 15
        trackCondition trackConditions;		// 18
        raceCondition raceConditions;		// 20-26
        positions horsePositions;			// 29-31
        float finalOdds;					// 35 - win odds for the horse at the start time of the race
        topThreeFinishers raceFinishers;	// 36
        char footNotes[100];				// 37 
        int numHorses;						// 38 
        char claimingInfo[50];				// 39 - shows new owner, previous owner, claiming price
        workoutLine horseWorkout;			// 40
 
 
      };
 
      int main  (  )
      {
 
		race_details myRaces[10];
		horse_details_and_past_performance myHorses[20];
 
        return (0);
      };