public boolean rotateString(String s1, String s2) {
		if (s1==null&&s2==null) return true;
		if (s1==null||s2==null||s1.length()!=s2.length()) return false;
		s2+=s2;
		for (int i=0,n=s1.length();i+n<=2*n;++i)
			if (s2.substring(i,i+n).equals(s1)) return true;
		return false;
	}