Solve 1016 (Timeout)
Rewrite 1016 (Timeout)