#include using namespace std; //#include //using namespace atcoder; using ll=long long; using Graph=vector>; #define MAX 1000000 #define MOD 1000000007 //#define MOD 998244353 #define INF 1000000000 //#define INF 1000000000000000000 int main(){ int N; cin>>N; vector A(N),B(N),C(N),D(N); vector R(N); for(int i=0;i>A[i]>>B[i]>>C[i]>>D[i]>>R[i]; } for(int d=0;d<10;d++){ bool flag=true; for(int i=0;i