Jack's student solution to ruby io