Given two strings str1 and str2, find the largest string x such that x divides both str1 and str2. A string t divides s if and only if s is t concatenated with itself one or more times.
Constraints
1 <= str1.length, str2.length <= 1000
str1 and str2 consist of English uppercase letters.