Lower upper finding problem

my code is working fine but i am failing on test case and i cant figure it out
here is my code:https://ide.codingblocks.com/s/251357

You are giving space while printing lowercase, Please remove that.