Solution to MP3 of CS241 at UIUC