For two strings s and t, we say "t divides s" if and only if s = t + t + t + ... + t + t (i.e., t is concatenated with itself one or more times).
You are given two strings str1 and str2, return the largest string x such that x divides both str1 and str2. If there is no such string, return "".
Example 1:
Input: str1 = "ABAB", str2 = "AB"
Output: "AB"Example 2:
Input: str1 = "NANANA", str2 = "NANA"
Output: "NA"Constraints:
1 <= str1.length, str2.length <= 1000str1 and str2 consist of English uppercase letters.