import java.util.*; class No29{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int One = 0; int Two = 0; int Three = 0; int Four = 0; int Five = 0; int Six = 0; int Seven = 0; int Eight = 0; int Nine = 0; int[][] num = new int[N][3]; for(int i=0; i