Mediocre solution to 41. Not great, but gets the answer