Lucy is learning string hash algorithm . For a given string SSS , she will execute the following code to get it's hash code . //LanguageC++14. } Ruby thinks the value of mod is not big enough , so he decides to generate a string TTT meets the following conditions . 1. TTT only contains lowercase English letters . 2. SSS is a prefix of TTT . 3. Hash code of SSS and TTT are the same . 4. 1≤∣T∣∣S∣≤501leq |T|-|S|leq 501≤∣T∣∣S∣≤50 . ∣S∣|S|∣S∣ means the length of string SSS .
Lucy is learning string hash algorithm . For a given string SSS , she will execute the following code to get it's hash code . //Language C++14 long long mod=5999993; long long gethas(string s) { long long ret=0; for (char c:s) ret=(ret*29+(c-'a'+1))%mod; return ret; } Ruby thinks the value of mod is not big enough , so he decides to generate a string TTT meets the following conditions . 1. TTT only contains lowercase English letters . 2. SSS is a prefix of TTT . 3. Hash code of SSS and TTT are the same . 4. 1≤∣T∣−∣S∣≤501leq |T|-|S|leq 501≤∣T∣−∣S∣≤50 . ∣S∣|S|∣S∣ means the length of string SSS .