stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <stdio.h>

#include <string.h>

#include <queue>

#define N 100010

int n,d[N];char inq[N];

inline int spfa(int s,int t) {

	std::queue<int> q;int u,v;

	memset(d,33,sizeof(d));

	q.push(s);d[s]=0;inq[s]=1;

	while(!q.empty()) {

		u=q.front();q.pop();inq[u]=0;

		v=u*10%n;

		if(d[u]<d[v]) {

			d[v]=d[u];

			if(!inq[v]) q.push(v),inq[v]=1;

		}

		v=u+1;if(v==n) v=0;

		if(d[u]+1<d[v]) {

			d[v]=d[u]+1;

			if(!inq[v]) q.push(v),inq[v]=1;

		}

	}

	return d[t];

}

int main() {

	scanf("%d",&n);

	printf("%d\n",1+spfa(1,0));

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.2578472463871988x):
#include <cstdio>

#include <cstring>

#include <queue>

#include <algorithm>

using namespace std;

typedef pair<int,int> P;

const int maxn=2e5+100;

int k;

bool vis[maxn];

 

int main()

{

    //freopen("1.txt","r",stdin);

    while (scanf("%d",&k)!=EOF)

    {

        memset(vis,0,sizeof(vis));

        deque<P> q;

        q.push_front(make_pair(1,1));

        while (!q.empty())

        {

            auto t=q.front(); q.pop_front();

            if (vis[t.first]) continue;

            vis[t.first]=1;

            if (t.first==0)

            {

                printf("%d\n",t.second);

                break;

            }

            q.push_front(make_pair(t.first*10%k,t.second));

            q.push_back(make_pair((t.first+1)%k,t.second+1));

        }

    }

    return 0;

}
// Slower C++ solution:


                                 /*Bismillahir Rahmanir Rahim*/





#include<bits/stdc++.h>

#include<cstring>

#include<vector>

#include<map>

#include<set>

#define ll long long int

#define dd double

using namespace std;



int main()

{

   ll a,b;

   cin>>a;

     dd  ans=( dd)a/3,ans1;

     ans1=pow(ans,3);

   

    cout<<fixed<<setprecision(10)<<ans1<<endl;



}

//Apna Time Aayega :)

// Faster C++ solution for the same problem (measured speedup: 5.110179570840794x):
////jsjks



#include<stdio.h>

int main()

{

    double l,e;

   scanf("%lf",&l);

        

        e=(l/3.0)*(l/3.0)*(l/3.0);

        

        

   printf("%lf",e);

        

        

        

        

    

    

    return 0;

}
// Slower C++ solution:
#include<stdio.h>

#include<iostream>

#include<cmath>

#include<algorithm>

#include<vector>

#include<map>

#include<set>

#include<stack>

#include<iterator>

#include<iomanip>

#include<string>

using namespace std;



int main()

{

    double l;

    cin>>l;

    cout<<fixed<<setprecision(10)<<l*l*l/27;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.140659690484717x):
////jsjks



#include<stdio.h>

int main()

{

    double l,e;

   scanf("%lf",&l);

        

        e=(l/3.0)*(l/3.0)*(l/3.0);

        

        

   printf("%lf",e);

        

        

        

        

    

    

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(NULL);

	cout.tie(NULL);

	long double l,ans;

	cin>> l;

	ans=l/3.0;

	ans=ans*ans*ans;

	printf("%Lf",ans);

	

	

}

// Faster C++ solution for the same problem (measured speedup: 5.162502317531091x):
////jsjks



#include<stdio.h>

int main()

{

    double l,e;

   scanf("%lf",&l);

        

        e=(l/3.0)*(l/3.0)*(l/3.0);

        

        

   printf("%lf",e);

        

        

        

        

    

    

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<algorithm>

#include<cstring>

#include<cmath>

#include<iomanip>

using namespace std;

int main()

{

long double a,ans;

    cin>>a;

   a=a/3;

    ans=a*a*a;



    cout<<fixed<<setprecision(12)<<ans<<endl;



     return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.150422789237493x):
////jsjks



#include<stdio.h>

int main()

{

    double l,e;

   scanf("%lf",&l);

        

        e=(l/3.0)*(l/3.0)*(l/3.0);

        

        

   printf("%lf",e);

        

        

        

        

    

    

    return 0;

}
// Slower C++ solution:


                                 /*Bismillahir Rahmanir Rahim*/





#include<bits/stdc++.h>

#include<cstring>

#include<vector>

#include<map>

#include<set>

#define ll long long int

#define dd double

using namespace std;



int main()

{

   ll a,b;

   cin>>a;

     dd  ans=( dd)a/3,ans1;

     ans1=pow(ans,3);

   

    cout<<fixed<<setprecision(10)<<ans1<<endl;



}

//Apna Time Aayega :)

// Faster C++ solution for the same problem (measured speedup: 5.110101393726721x):
///f. maximum volume

#include <stdio.h>

#include <math.h>



int main()

{

    double l;

    scanf("%lf",&l);

    l/=3.0;

    l=l*l*l;

    printf("%lf",l);

    return 0;

}
// Slower C++ solution:
#include<stdio.h>

#include<iostream>

#include<cmath>

#include<algorithm>

#include<vector>

#include<map>

#include<set>

#include<stack>

#include<iterator>

#include<iomanip>

#include<string>

using namespace std;



int main()

{

    double l;

    cin>>l;

    cout<<fixed<<setprecision(10)<<l*l*l/27;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.140581047076309x):
///f. maximum volume

#include <stdio.h>

#include <math.h>



int main()

{

    double l;

    scanf("%lf",&l);

    l/=3.0;

    l=l*l*l;

    printf("%lf",l);

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(NULL);

	cout.tie(NULL);

	long double l,ans;

	cin>> l;

	ans=l/3.0;

	ans=ans*ans*ans;

	printf("%Lf",ans);

	

	

}

// Faster C++ solution for the same problem (measured speedup: 5.162423339967391x):
///f. maximum volume

#include <stdio.h>

#include <math.h>



int main()

{

    double l;

    scanf("%lf",&l);

    l/=3.0;

    l=l*l*l;

    printf("%lf",l);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<algorithm>

#include<cstring>

#include<cmath>

#include<iomanip>

using namespace std;

int main()

{

long double a,ans;

    cin>>a;

   a=a/3;

    ans=a*a*a;



    cout<<fixed<<setprecision(12)<<ans<<endl;



     return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.150343996470168x):
///f. maximum volume

#include <stdio.h>

#include <math.h>



int main()

{

    double l;

    scanf("%lf",&l);

    l/=3.0;

    l=l*l*l;

    printf("%lf",l);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<iomanip>

using namespace std;

int main(){

    double n,result;

    cin>>n;

    n=n/3;

    result=n*n*n;

    printf("%.12f\n",(double)result);

}

// Faster C++ solution for the same problem (measured speedup: 5.153877665193537x):


 #include <stdio.h>



#define LL long long



int main(){



	LL l;



	scanf("%lld",&l);



	printf("%.12lf\n",(l*l*l*1.0/(3*3*3)));



	return 0;}
// Slower C++ solution:
#include<iostream>

#include<iomanip>

using namespace std;

int main(){

    double n,result;

    cin>>n;

    n=n/3;

    result=n*n*n;

    printf("%.12f\n",(double)result);

}

// Faster C++ solution for the same problem (measured speedup: 4.699888225241293x):
///I am Groot |*|

#include <stdio.h>

#include <math.h>



int main()

{

    double l,x,vol;

    scanf("%lf",&l);

    x=l/3;

    vol=pow(x,3.00);

    printf("%lf",vol);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<iomanip>

using namespace std;

int main(){

    double n,result;

    cin>>n;

    n=n/3;

    result=n*n*n;

    printf("%.12f\n",(double)result);

}

// Faster C++ solution for the same problem (measured speedup: 4.679457099301296x):
#include<stdio.h>

#include<math.h>

int main()

{

   double L,v;

    scanf("%lf",&L);

    v=pow((L/3),3);

    printf("%.12lf\n",v);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define all(c) (c).begin(),(c).end()

#define pb push_back 

#define mp make_pair

typedef long long ll;







int main(){

	double l; cin>>l;	

	

	printf("%.10lf",(l/3)*(l/3)*(l/3));

			

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.170022699900417x):
#include <stdio.h>

 

int main()

{

 

   int L;

   double S;

   scanf("%d",&L);

    S = L/3.0;

   printf("%lf",S*S*S);

   return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

using namespace std;

int main(){

	double n;

	cin>>n;

	double x=n;

	double v=x*x*x/27;

	printf("%.12f",v);

} 

// Faster C++ solution for the same problem (measured speedup: 5.169759984808685x):
#include <stdio.h>

 

int main()

{

 

   int L;

   double S;

   scanf("%d",&L);

    S = L/3.0;

   printf("%lf",S*S*S);

   return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>

#include <iomanip>

using namespace std;



int main() {

	int L;

	cin >> L;

	double volume = pow((double)L / 3,3);

	cout << fixed << setprecision(12) << volume << endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.187195695816363x):
#include <stdio.h>

 

int main()

{

 

   int L;

   double S;

   scanf("%d",&L);

    S = L/3.0;

   printf("%lf",S*S*S);

   return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



int main() {

    int L;

    scanf("%d", &L);

    printf("%.12f\n", (double) L * L * L / 27);

}


// Faster C++ solution for the same problem (measured speedup: 5.081512905083848x):
#include <stdio.h>

 

int main()

{

 

   int L;

   double S;

   scanf("%d",&L);

    S = L/3.0;

   printf("%lf",S*S*S);

   return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main()

{

    int a,b,c;

    cin>>a>>b>>c;



    if(a==b)

        cout<<c<<endl;

    else if(a==c)

        cout<<b<<endl;

    else

        cout<<a<<endl;



	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.266237938697498x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std ;



int main()



{

        int a,b,c;

        cin>>a>>b>>c;

        if(a==b&&a!=c)

            cout<<c;

       else if(b==c&& b!=a)

        cout<<a;

       else cout<<b;

     return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.258802758054002x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

#include <algorithm>

#include <string>

using namespace std;



int main()

{

    int a,b,c;

    cin>>a>>b>>c;

    if(a==b) cout<<c;

    if(a==c) cout<<b;

    if(b==c) cout<<a;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.259405589485095x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int main(){

	int a, b, c;

	cin >> a >> b >> c;

	if (a == b){

		cout << c << endl;

	}

	else if (a == c){

			cout << b << endl;

		}

	else {

		cout << a << endl;

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.266237938697498x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int a, b, c;

int main () {

	cin >> a >> b >> c;

	if (a == b){

		cout << c << endl;

	}

	else if (a == c){

		cout << b << endl;

	}

	else if (b == c){

		cout << a << endl;

	}

}


// Faster C++ solution for the same problem (measured speedup: 5.268272691292861x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int a,b,c,diff;

    cin>>a>>b>>c;

    if(a==b){

        diff=c;

        cout<<diff<<endl;

    }

    else if(a==c){

        diff=b;

        cout<<diff<<endl;

    }

    else{

        diff=a;

        cout<<diff<<endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.266237938697498x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main()

{

int A,B,C;

cin>>A>>B>>C;

if(A==B)

	cout<<C;

else if (A==C)

	cout<<B;

else 

	cout<<A;		



}




// Faster C++ solution for the same problem (measured speedup: 5.2589156110212025x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    int A,B,C;

    cin>>A>>B>>C;

    if(A==B){

        cout<<C;

    }

    else if(A==C){

        cout<<B;

    }

    else{

        cout<<A;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2589156110212025x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    int a,b,c ;

    cin >>a>>b>> c ;

    if (a==b){

        cout << c << endl;

    }else if (a==c){

    cout <<b<<endl;

    }else{

    cout<<a<< endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.266237938697498x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()



{

int x,z,y;





cin>>x>>y>>z;





if (x==y){

    cout <<z;

}



else if(x==z){

    cout<<y;

}

else{

    cout<<x;

}



 return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2589156110212025x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

int A,B,C;

cin>>A>>B>>C;

int x=A;

if(x==B){

    cout<<C<<endl;

}

else if(x==C){

    cout<<B<<endl;

}

else

    cout<<A<<endl;















return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.266237938697498x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main(){

    int A,B,C;

    cin>>A>>B>>C;

    if(A==B){

        cout<<C<<endl;

    }

    else if(A==C){

        cout<<B<<endl;

    }

    else if(B==C){

        cout<<A<<endl;

    }



    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2657254689545x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    int a,b,c;

    cin>>a>>b>>c;



     if(a==b   )

       cout<<c;

    else if(a==c )

        cout<<b;

     else

         cout<<a;





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2589156110212025x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>



int main() {

    int a ,b,c ;

    std::cin>>a;

    std::cin>>b;

    std::cin>>c;

    if (a == b){

        std::cout<<c<< "\n";

    }

    else if (a==c ){

        std::cout<<b<<"\n";

    }

    else if (b==c){

        std::cout<<a;

    }

    else {

        std::cout<<"invaild error";

    }

     }

// Faster C++ solution for the same problem (measured speedup: 5.267111798539778x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

	int A, B, C;

	cin >> A >> B >> C;

	if (A == B)

		cout << C << endl;

	else if (A == C)

		cout << B << endl;

	else if (B == C)

		cout << A << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.2657254689545x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

  int main()

  {

      int a,b,c;

      cin >> a >>b >> c;

      if(a==b)

        cout << c<< endl;

      else if (b==c)

        cout << a << endl;

      else

        cout << b<< endl;

      return 0;



  }

// Faster C++ solution for the same problem (measured speedup: 5.266150820399148x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    int a,b,c;

    cin>>a>>b>>c;

    if(a==b)

        cout<<c<<endl;

    else if(a==c)

        cout<<b<<endl;

    else if(c==b)

        cout<<a<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2657254689545x):
#include<stdio.h>



int main()

{

    int a,b,c;



    scanf("%d %d %d", &a, &b, &c);



    if (a!=b && a!=c) printf("%d",a);

    else if (b!=a && b!=c) printf("%d",b);

    else if (c!=a && c!=a) printf("%d",c);



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int Max=1e5+10;

const int MOD=1e9+7;

int a[Max];

int pos[Max];

ll inv[Max];

ll fac[Max];

int sp;

int ss;

void init() {

    fac[0]=1;

    fac[1]=1;

    inv[0]=1;

    inv[1]=1;

    for(ll i=2; i<=Max; i++) {

        fac[i]=fac[i-1]*i%MOD;

        inv[i]=(MOD-MOD/i)*inv[MOD%i]%MOD;

    }

    for(ll i=1; i<=Max; i++)

        inv[i]=inv[i]*inv[i-1]%MOD;

}

ll C(ll n, ll m) {

    if(m>n)

        return 0;

    return ((fac[n]*inv[m]%MOD)*inv[n-m])%MOD;

}

int main(){

    ios::sync_with_stdio(0);

    cin.tie(0);

    cout.tie(0);

    int n;

    cin>>n;

    init();

    for(int i=1;i<=n+1;i++){

        cin>>a[i];

        if(pos[a[i]]){

            ss=a[i];

            sp=i;

        }else{

            pos[a[i]]=i;

        }

    }

    for(int i=0;i<=n;i++){

        ll res=0;

        res+=C(n+1,i+1);

        res%=MOD;

        res=(res+MOD-C(n-sp+pos[a[sp]],i))%MOD;

        cout<<res<<endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 3.8363875918350767x):
#include <bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef pair<int, int> pii;

typedef pair<int, pii> pipii;

typedef pair<pii, int> piipi;

typedef pair<pii, pii> piipii;



#define mp make_pair

#define fi first

#define se second

#define all(a) (a).begin(), (a).end()

#define sz(a) (int)(a).size()

#define eb emplace_back

const int mod = 1e9+7;



int a[100005];

bool vis[100005];

ll f1[100005], f2[100005];

ll pw(ll a, ll b){

    ll ans = 1;

    while(b){

        if(b%2 == 1) ans = ans*a%mod;

        a = a*a%mod;

        b/=2;

    }

    return ans;

}

ll func(int a, int b){

    if(b > a) return 0;

    return f1[a]*f2[b]%mod*f2[a-b]%mod;

}



int main(){

    int n, l, r;

    scanf("%d", &n);

    f1[0] = f2[0] = 1;

    for(int i=1;i<=n+1;i++){

        f1[i] = f1[i-1]*i%mod;

        f2[i] = pw(f1[i], mod-2);

    }

    for(int i=1;i<=n+1;i++){

        scanf("%d", &a[i]);

        if(vis[a[i]]) r = i;

        vis[a[i]] = 1;

    }

    for(int i=1;i<=n+1;i++){

        if(a[i] == a[r]){

            l = i;

            break;

        }

    }

    for(int i=1;i<=n+1;i++){

        if(i == 1) printf("%d\n", n);

        else if(i == n+1) printf("1\n");

        else{

            ll ans = func(n+1, i);

            ans = (ans - func(n+1-(r-l+1), i-1) + mod)%mod;

            printf("%lld\n", ans);

        }

    }

}