#include <iostream>

using namespace std;

class C {
    public:
        C& first()  {
            cout << "first\n" ;
            return *this;
            };
        C& second() {
            cout << "second\n";
            return *this;
            };
        C& third()  {
            cout << "third\n" ;
            return *this;
            };
    };


int main(int argc, char* argv[]) {
    C c;
    c.first().second().third();
    }
