include[HTML_REMOVED]
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
if((int)a.length()<(int)b.length())
{
string c=b;
b=a;
a=c;
}
int count=1;
while(a.find(b)== -1 &&count<(int)a.length())
{
char s=a[0];
a.erase(0,1);
a=a+s;
count++;
}
if(count<=((int)a.length()-1)) {cout<<”true”;}
else {cout<<”false”;}
return 0;
}