Special Event | 프로그래밍의 벗 PivotOJ
PivotOJ

Special Event

시간 제한: 1000ms메모리 제한: 1024MB출처: CCC 2023 JuniorBOJ 28288

문제

You are trying to schedule a special event on one of five possible days.

Your job is to determine on which day you should schedule the event, so that the largest number of interested people are able to attend.

입력

The first line of input will contain a positive integer NN, representing the number of people interested in attending your event. The next NN lines will each contain one person's availability using one character for each of Day 11, Day 22, Day 33, Day 44, and Day 55 (in that order). The character Y means the person is able to attend and a period (.) means the person is not able to attend.

출력

The output will consist of one line listing the day number(s) on which the largest number of interested people are able to attend.

If there is more than one day on which the largest number of people are able to attend, output all of these day numbers in increasing order and separated by commas (without spaces).

예제

예제 1

입력
3
YY.Y.
...Y.
.YYY.
출력
4

예제 2

입력
5
YY..Y
.YY.Y
.Y.Y.
.YY.Y
Y...Y
출력
2,5
코드를 제출하려면 로그인하세요.