I'm a beginner coder and I'm trying to find cyclic shifts of strings. A cyclic shift of a string is obtained by moving characters from the beginning of the string to the end of the string. For example, the cyclic shifts of ABCDE are: ABCDE, BCDEA, CDEAB, DEABC, EABCD. The input will consist of exactly two lines containing only uppercase letters. The first line will bethe text T, and the second line will be the string S.
Output yes if the text, T, contains a cyclic shift of the string, S. Otherwise, output no.
Sample Input:
ABCCDEABAAABCDE
Output for Sample Input:
yes