All problems

Different Marker Shapes by Category (style)

mediumPythonSeabornstyle

Fernbrook Analytics ships panels to a client whose print edition is black and white, so groups are distinguished by marker shape rather than colour. Shape has an even harder limit than colour: only a handful of shapes are reliably told apart, and a shape assigned to a single record is wasted. The review report leads with the size of the biggest group, since that is the group the panel will really be about.

Task: Print how many records belong to the largest group.

Input

The first line holds one integer n, the number of records. Each of the next n lines holds two measurements and a group label, separated by single spaces. Labels contain no spaces.

Output

One line holding a single whole number: the number of records carrying the most common label. Print the count, not the label itself, and not the number of groups.

Example:

Input:
4
1 1 A
2 2 A
3 3 B
4 4 A

Output:
3

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…