#include <iostream>
#define EN unsigned short int
using namespace std;

int main() {
	EN length;
	bool has_gaps = false;
	cin >> length;
	EN* a = new EN[length];
	for (EN i = 0; i<length; ++i) {
		cin >> a[i];
	}
	if (a[0] != 1) {
		cout << "1-";
		cout << (a[0] - 1) << endl;
		has_gaps = true;
	}
	for (EN i = 2; i<length; ++i) {
		if (a[i] - a[i - 1] != 1) {
			cout << (a[i - 1] + 1);
			cout << "-";
			cout << (a[i] - 1) << endl;
			has_gaps = true;
		}
	}
	if (a[length - 1] != 100) {
		cout << (a[length - 1] + 1);
		cout << "-100\n";
		has_gaps = true;
	}
	if (!has_gaps) {
		cout << "All clear!";
	}
	delete a;
	return 0;
}