Check the code plz

wrong ans the print is running for the whole string

hello @goyalvivek

a) u need to read input strings in every test cases.
u r reading only once .correct it
b) print output for each test cases in seprate line