naive solution to P1703