#include <bits/stdc++.h>

using namespace std;

int main() {
    ios::sync_with_stdio(false);

    int n;
    cin >> n;

    if(n == 100) {
        cout << "All clear!";
        return 0;
    }

    int last = 0;
    for(int i = 1; i <= n; i++) {
        int x;
        cin >> x;

        if(x - last > 1) {
            cout << last + 1 << "-" << x - 1 << "\n";
        }
        last = x;
    }
    if(100 - last > 0) {
        cout << last + 1 << "-" << 100 << "\n";
    }

    cout << "\n";
    return 0;
}