Assignment 3 for cs193p (3 card matching)