5 (입력되는 단어의 개수)
banana
carrot
apple
carrot (마지막 단어로 주어진 것 'carrot'보다 알파벳 순서로 앞서는 것만 출력해야 한다.)
5 banana carrot apple apple carrot
apple banana