give string s return number distinct nonempty subsequence s since answer large return modulo 109 7a subsequence stre new string form original string delete character disturb relative position remain character ie ace subsequence abcde aec Example 1input s abcoutput 7explanation the 7 distinct subsequence b c ab ac bc abcexample 2Input s abaoutput 6explanation the 6 distinct subsequence b ab aa ba abaExample 3Input s aaaoutput 3explanation the 3 distinct subsequence aa aaa Constraints1 slength 2000s consist lowercase english letter