Wrote initial version of final program for Team A