Input is to be taken from a-z or A-Z and the input ends when we give a star(*). We need to have the first and last Capital letters of that input characters as the output. also, we should show the input we have taken each time. N.B. We take the inuputs character by character, not as a string.
Test case 1: input: aAbCcP* output: AP
Test case 2: input: ZabCBc* output: ZB