#include <iostream>
#include <iomanip>
#include <vector>

struct Range {
  int start;
  int end;
};

const bool bools[] = {true, false, false, false, true, true, false};
const int n = 7;

bool get_bool() {
	static int index = 0;
	return bools[index++];
}

int main() {
	std::vector<Range> result;
	if (n > 0) {
		result.reserve(n);
		Range range{0,0};

		bool curr = get_bool(); // get 1st value
		for (int i = 1; i < n; ++i) {
		    bool val = get_bool(); // get next value
			if (val != curr) {
				range.end = i - 1;
				result.push_back(range);
				range.start = i;
			}
			curr = val;
		}

		range.end = n - 1;
		result.push_back(range);
	}

    std::cout << std::boolalpha;
    std::cout << '{' << bools[0];
    for(int i = 1; i < n; ++i) {
		std::cout << ',' << bools[i];
	}
    std::cout << "}\n";

	for(const auto &range : result) {
		std::cout << range.start << '-' << range.end << '\n';
	}

	return 0;
}