This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//LCA
#include <bits/stdc++.h>
using namespace std;
int main(){
    int a = 0 , b = 0 , c = 0;
    int n;
    cin>>n;
    while(n--){
        string s,t;cin>>s>>t;
        if(s=="section"){
            cout<<++a<<" "<<t<<"\n";
            b = 0, c = 0;
        }if(s=="subsection"){
            cout<<a<<"."<<++b<<" "<<t<<"\n";
            c = 0;
        }if(s=="subsubsection"){
            cout<<a<<"."<<b<<"."<<++c<<" "<<t<<"\n";
        }
    }
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |