#Z15406. 【例70.1】 字符串移位包含问题

【例70.1】 字符串移位包含问题

Description

For a string, a cyclic shift operation is defined as: moving the first character of the string to the end to form a new string.
Given two strings s1s_1 and s2s_2, determine if one string is a substring of the other string after some number of cyclic shifts. For example, CDAACDAA is a substring of BCDAABCDAA, which is obtained by shifting AABCDAABCD twice, while ABCDABCD and ACBDACBD cannot be obtained through multiple shifts to make one string a substring of the other.

Input Format

One line containing two strings separated by a single space. The strings contain only letters and digits, with length not exceeding 3030.

Output Format

If one string is a substring of the other string after some number of cyclic shifts, output "truetrue"; otherwise, output "falsefalse".

Sample

AABCD CDAA
true