Iterations over strings

I have taken inputs 5 strings from a for loop. how can I iterate over all the 5 strings

@mohitshendre2609 could you show me how are you taking the inputs and where are you storing them.