#include <iostream>
#include <unistd.h>
#include  <sys/types.h>


using namespace std;

int main()
{
    cout<<"*"<<endl;
    if (fork()==-1) cout << "fork1 failed()" << endl;
    cout<<"A\n";
    if (fork()==-1) cout << "fork2 failed()" << endl;
    cout<<"B\n";
    if (fork()==-1) cout << "fork3 failed()" << endl;
    cout<<"C\n";
    return 0;
}