public int findMaximumMatching(String colors) {
		int length = colors.length();
		int lineMax = 0;
		for (int i = 0; i < length; i++) {
			String mColors = colors.substring(i) + colors.substring(0, i);
			int first = 1, last = length - 1, current = 0;
			int line = 0;
			for (; first + 1 < last; current++) {
				first = current + 1;
				char c = mColors.charAt(current);
				if (c == mColors.charAt(first)) {
					line++;
					current++;
				} else if (c == mColors.charAt(last)) {
					line++;
					last--;
				}
			}
			lineMax = Math.max(line, lineMax);
		}

		return lineMax;
	}