Amdocs Interview Question

pattern code ,logical question ,long chain