Version accepted by kattis for lab2