Given two strings, the task is to find if a string ('a') can be obtained by rotating another string ('b') by two places.
Input : a = "amazon" b = "azonam" // rotated anti-clockwise Output : 1 Input : a = "amazon" b = "onamaz" // rotated clockwise Output : 1
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. In the next two line are two string a and b.
For each test case in a new line print 1 if the string 'a' can be obtained by rotating string 'b' by two places else print 0.
1<=length of a, b <100