import java.util.HashMap; import java.util.Map; import java.util.Scanner; class Counter { HashMap level; public Counter() { level = new HashMap(); } public void setLevel(int n) { String s; for (int i = 1; i <= n; i++) { s = "Lv" + String.valueOf(i); level.put(s, 0); } } public void voteLevel(int n) { String s = "Lv" + String.valueOf(n); level.put(s, level.get(s) + 1); } public String answer() { String ans = ""; int i = -1; for (Map.Entry e : level.entrySet()) { if (i < e.getValue()) { i = e.getValue(); ans = e.getKey(); } else if (i == e.getValue()) { int ansi = Integer.parseInt(ans.substring(ans.length() - 1)); int ei = Integer.parseInt(e.getKey().substring(e.getKey().length() - 1)); if (ansi < ei) { ans = e.getKey(); } } } return ans.substring(ans.length() - 1); } } public class No_79_2 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); Counter counter = new Counter(); counter.setLevel(6); for (int i = 0; i < n; i++) { counter.voteLevel(sc.nextInt()); } System.out.println(counter.answer()); sc.close(); } }