#include <bits/stdc++.h>
#include <ext/random>
#include <ext/pb_ds/assoc_container.hpp>
#include "grader.h"
// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define pb push_back
#define ppb pop_back
#define fr first
#define sc second
#define all(v) v.begin(), v.end()
#define vektor vector
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using ull = unsigned ll;
using ld = long double;
constexpr ull Mod = 100;
constexpr ull Mod2 = 1 + 7 * 17 * (1 << 23);
constexpr ull sqr = 320;
constexpr ld eps = 1e-12;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll random(ll l, ll r) {if(l <= r) return uniform_int_distribution <ll> (l, r)(rng); return -1;}
int a[100][100], mark[56];
void excerpt(int e[100]){
for(int i = 0; i <= 55; i ++){
int cnt = 0;
for(int j = 0; j < 100; j ++){
if(a[i][j] == e[j]) cnt ++;
}
if(cnt == 100){
language(i);
return;
}
}
mark[0] = 1;
int num = random(0, 55);
while(mark[num]) num = random(0, 55);
int ans = language(num);
if(ans == num){
for(int j = 0; j < 100; j ++) a[ans][j] = e[j];
mark[ans] = 1;
}
}