Codeforces Solution By Scishowengineer