While I was trying to submit answer for this problem I got runtime error even if my solution is correct. Then I checked submissions of others and found that every 1 in 3 submissions using python3 faced the same issue. Out of 3478 submissions 1216 submissions resulted in runtime error.
