import std.stdio, std.string, std.conv, std.algorithm; import std.range, std.array, std.math, std.typecons, std.functional; void main() { int n = readln.chomp.to!int; auto L = readln.split.to!(int[]); auto cnt = new int[](10); foreach (li ; L) { cnt[li]++; } auto x = cnt.maxElement; foreach_reverse (i ; 0 .. 10) { if (cnt[i] == x) { writeln(i); return; } } }