Language: C++

We have NN voting papers. The ii-th vote (1≤i≤N)(1≤i≤N) has the string SiSi written on it.

Print all strings that are written on the most number of votes, in lexicographical order.

Constraints

1≤N≤2×1051≤N≤2×105

SiSi (1≤i≤N)(1≤i≤N) are strings consisting of lowercase English letters.

The length of SiSi (1≤i≤N)(1≤i≤N) is between 11 and 1010 (inclusive).

Input

Input is given from Standard Input in the following format:

NN S1S1 :: SNSN 

Output

Print all strings in question in lexicographical order.

#include<cstdio>
#include<cstdlib>
#include<iostream>
using namespace std;
int main()
{
	int a,b,c,t=0;
	cin>>a>>b>>c;
	if(a==b)
		t+=10;
	if(b==c)
		t+=100;
	if(a==c)
		t+=1000;
	switch(t)
	{
		case 10:cout<<"YES";break;
		case 100:cout<<"YES";break;
		case 1000:cout<<"YES";break;
		default:cout<<"NO";break;		
	}
	return 0;
}

Compiler output:
a.cc:1:4: error: extended character   is not valid in an identifier
    1 | We have NN voting papers. The ii-th vote (1≤i≤N)(1≤i≤N) has the string SiSi written on it.
      |    ^
a.cc:1:4: error: extended character   is not valid in an identifier
a.cc:1:27: error: extended character   is not valid in an identifier
    1 | We have NN voting papers. The ii-th vote (1≤i≤N)(1≤i≤N) has the string SiSi written on it.
      |                           ^
a.cc:1:37: error: extended character   is not valid in an identifier
    1 | We have NN voting papers. The ii-th vote (1≤i≤N)(1≤i≤N) has the string SiSi written on it.
      |                                     ^
a.cc:1:43: error: extended character ≤ is not valid in an identifier
    1 | We have NN voting papers. The ii-th vote (1≤i≤N)(1≤i≤N) has the string SiSi written on it.
      |                                           ^
a.cc:1:43: error: extended character ≤ is not valid in an identifier
a.cc:1:50: error: extended character ≤ is not valid in an identifier
    1 | We have NN voting papers. The ii-th vote (1≤i≤N)(1≤i≤N) has the string SiSi written on it.
      |                                                  ^
a.cc:1:50: error: extended character ≤ is not valid in an identifier
a.cc:1:56: error: extended character   is not valid in an identifier
    1 | We have NN voting papers. The ii-th vote (1≤i≤N)(1≤i≤N) has the string SiSi written on it.
      |                                                        ^
a.cc:1:65: error: extended character   is not valid in an identifier
    1 | We have NN voting papers. The ii-th vote (1≤i≤N)(1≤i≤N) has the string SiSi written on it.
      |                                                                 ^
a.cc:1:65: error: extended character   is not valid in an identifier
a.cc:7:1: error: extended character ≤ is not valid in an identifier
    7 | 1≤N≤2×1051≤N≤2×105
      | ^
a.cc:7:1: error: extended character ≤ is not valid in an identifier
a.cc:7:1: error: extended character × is not valid in an identifier
a.cc:7:1: error: extended character ≤ is not valid in an identifier
a.cc:7:1: error: extended character ≤ is not valid in an identifier
a.cc:7:1: error: extended character × is not valid in an identifier
a.cc:9:1: error: extended character   is not valid in an identifier
    9 | SiSi (1≤i≤N)(1≤i≤N) are strings consisting of lowercase English letters.
      | ^
a.cc:9:7: error: extended character ≤ is not valid in an identifier
    9 | SiSi (1≤i≤N)(1≤i≤N) are strings consisting of lowercase English letters.
      |       ^
a.cc:9:7: error: extended character ≤ is not valid in an identifier
a.cc:9:14: error: extended character ≤ is not valid in an identifier
    9 | SiSi (1≤i≤N)(1≤i≤N) are strings consisting of lowercase English letters.
      |              ^
a.cc:9:14: error: extended character ≤ is not valid in an identifier
a.cc:9:20: error: extended character   is not valid in an identifier
    9 | SiSi (1≤i≤N)(1≤i≤N) are strings consisting of lowercase English letters.
      |                    ^
a.cc:11:12: error: extended character   is not valid in an identifier
   11 | The length of SiSi (1≤i≤N)(1≤i≤N) is between 11 and 1010 (inclusive).
      |            ^
a.cc:11:12: error: extended character   is not valid in an identifier
a.cc:11:21: error: extended character ≤ is not valid in an identifier
   11 | The length of SiSi (1≤i≤N)(1≤i≤N) is between 11 and 1010 (inclusive).
      |                     ^
a.cc:11:21: error: extended character ≤ is not valid in an identifier
a.cc:11:28: error: extended character ≤ is not valid in an identifier
   11 | The length of SiSi (1≤i≤N)(1≤i≤N) is between 11 and 1010 (inclusive).
      |                            ^
a.cc:11:28: error: extended character ≤ is not valid in an identifier
a.cc:11:34: error: extended character   is not valid in an identifier
   11 | The length of SiSi (1≤i≤N)(1≤i≤N) is between 11 and 1010 (inclusive).
      |                                  ^
a.cc:11:38: error: extended character   is not valid in an identifier
   11 | The length of SiSi (1≤i≤N)(1≤i≤N) is between 11 and 1010 (inclusive).
      |                                      ^
a.cc:11:38: error: extended character   is not valid in an identifier
a.cc:11:38: error: extended character   is not valid in an identifier
a.cc:11:38: error: extended character   is not valid in an identifier
a.cc:1:1: error: 'We' does not name a type
    1 | We have NN voting papers. The ii-th vote (1≤i≤N)(1≤i≤N) has the string SiSi written on it.
      | ^~
In file included from /usr/include/c++/14/iosfwd:42,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:25:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
   68 |   typedef ptrdiff_t     streamsize; // Signed integral type
      |           ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
   40 | #include <cwchar> // For mbstate_t
  +++ |+#include <cstddef>
   41 | 
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
  131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                            ^~~~~~
In file included from /usr/include/stdio.h:34,
                 from /usr/include/c++/14/cstdio:42,
                 from a.cc:23:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
  132 |   __attribute__((__externally_visible__));
      |                                         ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
  133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                              ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
  134 |   __attribute__((__externally_visible__));
      |                                         ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
  140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
      |                             ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
  142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
      |                               ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
  145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                          ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                            ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
  145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                                    ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
  147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                          ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                              ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
  147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                                      ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
  154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
      |                          ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
      |                                            ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |