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

using namespace std;

#define int long long

vector<pair<int,pair<int,int> > >points;

vector<pair<int,pair<int,int> > > edge;

int par[100005];

bool cmp(pair<int,pair<int,int> > &a,pair<int,pair<int,int> > &b ){

	return a.second.first<b.second.first;

}

bool cmp2(pair<int,pair<int,int> > &a,pair<int,pair<int,int> > &b ){

	return a.second.second<b.second.second;

}

void init(){

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

		par[i]=i;

	}

}

int find(int i){

	if(par[i]==i) return par[i];

	return par[i]=find(par[i]);

}

void dsu(int i,int j){

	par[find(i)]=find(j);

}

bool same(int i,int j){

	return find(i)==find(j);

}

signed main(){

//	freopen("plantree.inp","w",stdin);

//	freopen("plantree.out","r",stdout);

	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

	int n;

	cin>>n;

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

		int x,y;

		cin>>x>>y;

		points.push_back(make_pair(i,make_pair(x,y)));

	}	

	init();

	sort(points.begin(),points.end(),cmp);

	for(int i=1;i<points.size();i++){

		edge.push_back(make_pair(points[i].second.first-points[i-1].second.first,make_pair(points[i].first,points[i-1].first)));

	}

	sort(points.begin(),points.end(),cmp2);

	for(int i=1;i<points.size();i++){

		edge.push_back(make_pair(points[i].second.second-points[i-1].second.second,make_pair(points[i].first,points[i-1].first)));

	}

	sort(edge.begin(),edge.end());

	int ans=0;

	

	for(int i=0;i<edge.size();i++){

		if(!same(edge[i].second.second,edge[i].second.first)){

			ans+=edge[i].first;

			dsu(edge[i].second.second,edge[i].second.first);

		}

	}

	cout<<ans;

}

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

#pragma O3

using namespace std;

struct node{

	int v,l,r;

};

struct no{

	int x,y,p;

};

struct cmp1{

	bool operator()(no a,no b){

		if(a.x!=b.x) return a.x<b.x;

		if(a.y!=b.y) return a.y<b.y;

		return a.p<b.p;

	}

};

struct cmp2{

	bool operator()(no a,no b){

		if(a.y!=b.y)return a.y<b.y;

		if(a.x!=b.x) return a.x<b.x;

		return a.p<b.p;

	}

};

struct cmppq{

	bool operator()(node a,node b){

		if(a.v!=b.v) return a.v>b.v;

		if(a.l!=b.l) return a.l>b.l;

		return a.r>b.r;

	}

};

vector<no> r;

priority_queue<node,vector<node>,cmppq> pq;

int par[100004];

int Find(int x){

	if(x!=par[x]) par[x]=Find(par[x]);

	return par[x];

}

void Union(int x,int y){

	int px=Find(x);

	int py=Find(y);

	if(px!=py) par[py]=px;

}

signed main(){

//	freopen(".inp","r",stdin);

//	freopen(".out","w",stdout);

//	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	int n,u,v,tmp,ans=0;

	cin>>n;

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

		cin>>u>>v;

		r.push_back({u,v,i});

		par[i]=i;

	}

	sort(r.begin(),r.end(),cmp1());

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

		tmp=min(abs(r[i].x-r[i+1].x),abs(r[i].y-r[i+1].y));

		pq.push({tmp,r[i].p,r[i+1].p});

	}

	sort(r.begin(),r.end(),cmp2());

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

		tmp=min(abs(r[i].x-r[i+1].x),abs(r[i].y-r[i+1].y));

		pq.push({tmp,r[i].p,r[i+1].p});

	}

	while(!pq.empty()){

		u=pq.top().l;

		v=pq.top().r;

		if(Find(u)!=Find(v)){

			ans+=pq.top().v;

			Union(u,v);

		}

		pq.pop();

	}

	cout<<ans;

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

#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;

const int maxN=1e5+5;



int fa[maxN];



struct node

{

    int x,y,id;

}a[maxN],b[maxN];



struct edge

{

    int f,t,w;

}e[maxN*2];



bool cmp1(node x1,node x2)

{

    return x1.x<x2.x;

}



bool cmp2(node x1,node x2)

{

    return x1.y<x2.y;

}



bool cmp3(edge x1,edge x2)

{

    return x1.w<x2.w;

}



int find(int x)

{

    if(fa[x]==-1)return x;

    return fa[x]=find(fa[x]);

}



int uni(int f,int t)

{

    f=find(f);t=find(t);

    if(f==t)return 0;

    fa[f]=t;return 1;

}



int main()

{

    int k,n,cnt=0,now=0;

    long long ans=0;

    memset(fa,-1,sizeof(fa));

    scanf("%d",&n);

    for(k=0;k<n;k++)

    {

        scanf("%d%d",&a[k].x,&a[k].y);

        a[k].id=k;b[k].id=k;

        b[k].x=a[k].x;

        b[k].y=a[k].y;

    }

    sort(a,a+n,cmp1);

    sort(b,b+n,cmp2);

    for(k=1;k<n;k++)

    {

        e[cnt].f=a[k-1].id;

        e[cnt].t=a[k].id;

        e[cnt].w=a[k].x-a[k-1].x;

        cnt++;

    }

    for(k=1;k<n;k++)

    {

        e[cnt].f=b[k-1].id;

        e[cnt].t=b[k].id;

        e[cnt].w=b[k].y-b[k-1].y;

        cnt++;

    }

    sort(e,e+cnt,cmp3);

    for(k=0;k<cnt;k++)

    {

        if(uni(e[k].f,e[k].t))

        {

            ans+=e[k].w;

            now++;

        }

        if(now==n-1)break;

    }

    cout<<ans;

    return 0;

}


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

#pragma O3

using namespace std;

struct node{

	int v,l,r;

};

struct no{

	int x,y,p;

};

struct cmp1{

	bool operator()(no a,no b){

		if(a.x!=b.x) return a.x<b.x;

		if(a.y!=b.y) return a.y<b.y;

		return a.p<b.p;

	}

};

struct cmp2{

	bool operator()(no a,no b){

		if(a.y!=b.y)return a.y<b.y;

		if(a.x!=b.x) return a.x<b.x;

		return a.p<b.p;

	}

};

struct cmppq{

	bool operator()(node a,node b){

		if(a.v!=b.v) return a.v>b.v;

		if(a.l!=b.l) return a.l>b.l;

		return a.r>b.r;

	}

};

vector<no> r;

priority_queue<node,vector<node>,cmppq> pq;

int par[100004];

int Find(int x){

	if(x!=par[x]) par[x]=Find(par[x]);

	return par[x];

}

void Union(int x,int y){

	int px=Find(x);

	int py=Find(y);

	if(px!=py) par[py]=px;

}

signed main(){

//	freopen(".inp","r",stdin);

//	freopen(".out","w",stdout);

//	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	int n,u,v,tmp,ans=0;

	cin>>n;

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

		cin>>u>>v;

		r.push_back({u,v,i});

		par[i]=i;

	}

	sort(r.begin(),r.end(),cmp1());

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

		tmp=min(abs(r[i].x-r[i+1].x),abs(r[i].y-r[i+1].y));

		pq.push({tmp,r[i].p,r[i+1].p});

	}

	sort(r.begin(),r.end(),cmp2());

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

		tmp=min(abs(r[i].x-r[i+1].x),abs(r[i].y-r[i+1].y));

		pq.push({tmp,r[i].p,r[i+1].p});

	}

	while(!pq.empty()){

		u=pq.top().l;

		v=pq.top().r;

		if(Find(u)!=Find(v)){

			ans+=pq.top().v;

			Union(u,v);

		}

		pq.pop();

	}

	cout<<ans;

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

#include <cstring>

#include <algorithm>

#include <vector>

const int N = 200005, P = 1000000007;

int n;

std::vector<int> E[N];

int fac[N], inv[N];

int sz[N], f[N], g[N], ans[N];

int qpow(int a, int b = P - 2){

	int s = 1;

	for (; b; b >>= 1, a = 1ll * a * a % P) if (b & 1) s = 1ll * s * a % P;

	return s;

}

void init(int n){

	fac[0] = 1;

	for (register int i = 1; i <= n; ++i) fac[i] = 1ll * fac[i - 1] * i % P;

	inv[n] = qpow(fac[n], P - 2);

	for (register int i = n; i; --i) inv[i - 1] = 1ll * inv[i] * i % P;

}

int C(int n, int m){

	if (m < 0 || m > n) return 0;

	return 1ll * fac[n] * inv[m] % P * inv[n - m] % P; 

}

void dfs_f(int u, int fa = 0){

	f[u] = 1, sz[u] = 1;

	for (int v : E[u])

		if (v != fa){

			dfs_f(v, u), sz[u] += sz[v];

			f[u] = 1ll * f[u] * f[v] % P * C(sz[u] - 1, sz[v]) % P;

		}

}

void dfs_g(int u, int fa = 0){

	ans[u] = 1ll * f[u] * g[u] % P * C(n - 1, n - sz[u]) % P;

	for (int v : E[u])

		if (v != fa){

			g[v] = 1ll * ans[u] * qpow(1ll * f[v] * C(n - 1, sz[v]) % P, P - 2) % P;

			dfs_g(v, u);

		}

}

int main(){

	scanf("%d", &n);

	for (register int i = 1, u, v; i < n; ++i)

		scanf("%d%d", &u, &v), E[u].push_back(v), E[v].push_back(u);

	init(n);

	dfs_f(1), g[1] = 1, dfs_g(1);

	for (register int i = 1; i <= n; ++i) printf("%d\n", ans[i]);

}


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

using namespace std;

template<class t> inline t read(t &x){

	char c=getchar();bool f=0;x=0;

	while(!isdigit(c)) f|=c=='-',c=getchar();

	while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();

	if(f) x=-x;return x;

}

template<class t> inline void write(t x){

	if(x<0) putchar('-'),write(-x);

	else{if(x>9) write(x/10);putchar('0'+x%10);}

}



#define int long long



const int mod=1e9+7,N=2e5+5;

int en,h[N],fac[N],inv[N],g[N],f[N],n,sz[N];



struct edge{

	int n,v;

}e[N<<1];



void add(int x,int y){

	e[++en]=(edge){h[x],y};

	h[x]=en;

}



int fpow(int x,int y){

	int res=1;

	for(;y;y>>=1,x=x*x%mod) if(y&1) res=res*x%mod;

	return res;

}



int C(int x,int y){

	return fac[x]*inv[y]%mod*inv[x-y]%mod;

}



void dfs1(int x,int fa){

	f[x]=1;

	for(int i=h[x];i;i=e[i].n){

		int y=e[i].v;

		if(y==fa) continue;

		dfs1(y,x);

		sz[x]+=sz[y];

		f[x]=f[x]*f[y]%mod*C(sz[x],sz[y])%mod;

	}

	sz[x]++;

}



void dfs2(int x,int fa){

	for(int i=h[x];i;i=e[i].n){

		int y=e[i].v;

		if(y==fa) continue;

		g[y]=f[y]*g[x]%mod*fpow(f[y]*C(n-1,sz[y])%mod,mod-2)%mod*C(n-1,n-sz[y])%mod;

		dfs2(y,x);

	}

}



signed main(){

	read(n);

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

		read(x);read(y);

		add(x,y);add(y,x);

	}

	fac[0]=1;

	for(int i=1;i<=n;i++) fac[i]=fac[i-1]*i%mod;

	inv[n]=fpow(fac[n],mod-2);

	for(int i=n-1;i>=0;i--) inv[i]=inv[i+1]*(i+1)%mod;

	dfs1(1,0);

	g[1]=f[1];

	dfs2(1,0);

	for(int i=1;i<=n;i++) write(g[i]),puts("");

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



using namespace std;



typedef long long ll;



const int N = 2e5 + 5, mod = 1e9 + 7;



int n;

int siz[N], mul[N], ans[N];

vector<int> g[N];



int pw(int x, int y) {

    int res = 1;

    while (y) {

        if (y & 1)

            res = (ll)res * x % mod;

        x = (ll)x * x % mod;

        y >>= 1;

    }

    return res; 

}



void dfs(int u, int fa) {

    siz[u] = 1, mul[u] = 1;

    for (auto v : g[u]) 

        if (v != fa) {

            dfs(v, u);

            siz[u] += siz[v];

            mul[u] = (ll)mul[u] * mul[v] % mod;

        }

    mul[u] = (ll)mul[u] * siz[u] % mod;

}



void dfs2(int u, int fa, int fromFa) {

    if (u != 1)

        ans[u] = (ll)mul[u] * pw(siz[u], mod - 2) % mod * n % mod * fromFa % mod;

    else 

        ans[u] = (ll)mul[u] * fromFa % mod; 

    for (auto v : g[u]) 

        if (v != fa) {

            int tmp = (ll)fromFa * mul[u] % mod * pw(mul[v], mod - 2) % mod * pw(siz[u], mod - 2) % mod * (n - siz[v]) % mod;

            dfs2(v, u, tmp);

        }

}



int main() {

    ios::sync_with_stdio(false);

    cin >> n;

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

        int u, v;

        cin >> u >> v;

        g[u].push_back(v);

        g[v].push_back(u);

    }

    dfs(1, 0);

    dfs2(1, 0, 1);

    int x = 1;

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

        x = (ll)x * i % mod;

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

        cout << (ll)x * pw(ans[i], mod - 2) % mod << '\n';

    return 0; 

}

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

using namespace std;

template<class t> inline t read(t &x){

	char c=getchar();bool f=0;x=0;

	while(!isdigit(c)) f|=c=='-',c=getchar();

	while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();

	if(f) x=-x;return x;

}

template<class t> inline void write(t x){

	if(x<0) putchar('-'),write(-x);

	else{if(x>9) write(x/10);putchar('0'+x%10);}

}



#define int long long



const int mod=1e9+7,N=2e5+5;

int en,h[N],fac[N],inv[N],g[N],f[N],n,sz[N];



struct edge{

	int n,v;

}e[N<<1];



void add(int x,int y){

	e[++en]=(edge){h[x],y};

	h[x]=en;

}



int fpow(int x,int y){

	int res=1;

	for(;y;y>>=1,x=x*x%mod) if(y&1) res=res*x%mod;

	return res;

}



int C(int x,int y){

	return fac[x]*inv[y]%mod*inv[x-y]%mod;

}



void dfs1(int x,int fa){

	f[x]=1;

	for(int i=h[x];i;i=e[i].n){

		int y=e[i].v;

		if(y==fa) continue;

		dfs1(y,x);

		sz[x]+=sz[y];

		f[x]=f[x]*f[y]%mod*C(sz[x],sz[y])%mod;

	}

	sz[x]++;

}



void dfs2(int x,int fa){

	for(int i=h[x];i;i=e[i].n){

		int y=e[i].v;

		if(y==fa) continue;

		g[y]=f[y]*g[x]%mod*fpow(f[y]*C(n-1,sz[y])%mod,mod-2)%mod*C(n-1,n-sz[y])%mod;

		dfs2(y,x);

	}

}



signed main(){

	read(n);

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

		read(x);read(y);

		add(x,y);add(y,x);

	}

	fac[0]=1;

	for(int i=1;i<=n;i++) fac[i]=fac[i-1]*i%mod;

	inv[n]=fpow(fac[n],mod-2);

	for(int i=n-1;i>=0;i--) inv[i]=inv[i+1]*(i+1)%mod;

	dfs1(1,0);

	g[1]=f[1];

	dfs2(1,0);

	for(int i=1;i<=n;i++) write(g[i]),puts("");

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

using namespace std;

typedef long long ll;

const int N=2e3+5,inf=0x3f3f3f3f;

char s[N][N];

int a,b,n=100;

int main()

{

	cin>>a>>b;

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

		for(int j=1;j<=n;j++)

		{

			if(j>50)

				s[i][j]='#';

			else

				s[i][j]='.';

		}

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

		for(int j=1;j<50;j++)

		{

			if((i+j)%2&&b!=1)

				s[i][j]='#',b--;

		}

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

		for(int j=51;j<=100;j++)

		{

			if((i+j)%2&&a!=1)

				s[i][j]='.',a--;

		}

	puts("100 100");

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

	{

		for(int j=1;j<=n;j++)

			printf("%c",s[i][j]);

		printf("\n");

	}

		

	return 0;

}

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

#include <list>

#include <map>

#include <set>

#include <deque>

#include <stack>

#include <bitset>

#include <algorithm>

#include <functional>

#include <iostream>

#include <iomanip>

#include <cstdio>

#include <cmath>

#include <set>

//#inlcude<stringstream>

#define ll long long

#define MODD 1000000007

using namespace std;

ll arr[1000000]={0};

ll brr[1000000]={0};

int main() {

    //

    ll a , b;cin >>a>>b;

    int flag=1;

    a--,b--;

    cout<<100<<" "<<100<<endl;

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

        for(int j=1;j<=100;j++){

           if(i%2==0&&j%2==0&&a){

                a--;

                cout<<".";

           }

           else cout<<"#";

        }

       cout<<endl;

    }

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

        for(int j=1;j<=100;j++){

            if(i%2==0&&j%2==0&&b){

                b--;

                cout<<"#";

           }

           else cout<<".";

        }

        cout<<endl;



    }

    return 0;

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

using namespace std;

typedef long long ll;

typedef pair<int,int> P;

#define rep(i,N) for(ll (i)=0;(i)<(N);(i)++)

const int mod = 1000000007;



int main() {

  int a, b;

  cin >> a >> b;

  int h = 100, w = 100;

  vector<vector<char>> s(101, vector<char>(101));

  rep(i, h / 2) {

    rep(j, w) s[i][j] = '.';

  }

  for(int i = h / 2; i < h; ++i) {

    rep(j, w) s[i][j] = '#';

  }



  --a; --b;

  int cur = 0;

  int height = 0;

  rep(i, b) {

    if(cur >= w) cur = 0, height += 2;

    s[height][cur] = '#';

    cur += 2;

  }

  height = h / 2 + 1;

  cur = 0;

  rep(i, a) {

    if(cur >= w) cur = 0, height += 2;

    s[height][cur] = '.';

    cur += 2;

  }

  cout << h << " " << w << endl;

  rep(i, h) {

    rep(j, w) {

      cout << s[i][j];

    }

    cout << endl;

  }



}

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

#include<vector>

#include<string>

#include<algorithm>

#include<utility>

#include<cmath>

#include<climits>

#include<queue>

#include<stack>

#include<numeric>

#include<set>

#include<iomanip>

#include<map>

#include<type_traits>

#include<tuple>

#include<deque>

#include<cassert>

#include<bitset>

using namespace std;

typedef long long ll;

typedef pair<int,int> P;

#define rep(i,N) for(ll (i)=0;(i)<(N);(i)++)

#define chmax(x,y) x=max(x,y)

#define chmin(x,y) x=min(x,y)

const int mod = 1000000007;

const int MAXH = 100;

const int MAXW = 100;



int main() {

  

  int a, b;

  cin >> a >> b;

  vector<string> s(MAXH);

  rep(i, MAXH / 2) {

    s[i] = string(MAXW, '#');

  }

  for (int i = MAXH / 2; i < MAXH; ++i) {

    s[i] = string(MAXW, '.');

  }

  a--; b--;



  int cur = 0;

  rep(i, a) {

    if(cur % 200 == 100) cur += 100;

    s[cur / MAXW][cur % MAXW] = '.';

    cur += 2;

    

  }

  cur = 50 * 100 + 100;

  rep(i, b) {

    if(cur % 200 == 100) cur += 100;

    s[cur / MAXW][cur % MAXW] = '#';

    cur += 2;

    

  }

  cout << MAXH << " " << MAXW << endl;

  rep(i, MAXH) cout << s[i] << endl;

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

#include<stdio.h>

#include<cstring>

#include<cmath>

#include<algorithm>

#include<vector>

#include<map>

#include<set>

#include<queue>

#define ll long long

using namespace std;

int pos(int n)

{

    if(n<0)

        return 0;

    else

        return n;

}

int main()

{

    int a,b;

    cin>>a>>b;

    cout<<100<<" "<<100<<endl;

    int s[102][102]={0};//0为黑1为白.

    for(int i=51;i<=100;i++){

        for(int j=1;j<=100;j++){

            s[i][j]=1;

        }

    }

    a--,b--;

    for(int i=1;i<=50;i+=2){

        int j=1;

        for( ;j<=100;j+=2){

            if(a>0){

                s[i][j]=1;

                a--;

            }else{

                break;

            }

        }

    }

    for(int i=100;i>=51;i-=2){

        for(int j=1;j<=100;j+=2){

            if(b>0){

                s[i][j]=0;

                b--;

            }else{

                break;

            }

        }

    }

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

        int j=1;

        for ( ;j<=100;j++){

            if(s[i][j]==1)

                cout<<".";

            else

                cout<<"#";

        }

        cout<<endl;

    }

}


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

/**

 * @Samaritan

 */

#include<bits/stdc++.h>

using namespace std;

typedef long long LL;



#define pb emplace_back

#define fi first

#define se second

#define PII pair<int, int>

#define PLL pair<LL, LL>



LL quick_pow (LL a, LL b, LL mod) {

    LL ans = 1, base = a;

    while (b) {

        if (b & 1) (ans *= base) %= mod;

        b >>= 1;

        (base *= base) %= mod;

    }

    return ans;

}



const int mod = 1e9 + 7;

const int N = 2e2 + 5;



struct node {

    int pos, v;

    bool operator < (const node& k) const {

        return v > k.v;

    }

};



char pic[N][N];



int main() {

    int a, b;

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

    memset(pic, 0, sizeof pic);

    int n = 100;

    int cnt = b - 1;

    int max_col = 2;

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

        if (!cnt) break;

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

            if (i & 1 && j & 1) {

                pic[i][j] = '#';

                cnt--;

                if (!cnt) {

                        max_col = i + 1;

                    break;

                }

            }

        }

        if (!cnt) break;

    }

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

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

            if (!pic[i][j]) pic[i][j] = '.';

        }

    }

    cnt = a - 1;

    for (int i = max_col + 2; i <= n; ++i) {

        if (!cnt) break;

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

            if (i & 1 && j & 1) {

                pic[i][j] = '.';

                cnt--;

                if (!cnt) {

                    break;

                }

            }

        }

        if (!cnt) break;

    }

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

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

            if (!pic[i][j]) pic[i][j] = '#';

        }

    }

    printf("100 100\n");

    for (int i = 1; i <= n; ++i) printf("%s\n", pic[i] + 1);

    return 0;

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

#include<iostream>

using namespace std;

string S;

char a[27] = {0};

int main()

{

    cin>>S;

    for (int i = 0; i < S.size(); i++)

        a[S[i] - 'a'] = 1;

    for (int i = 0; i < 26; i++)

        if(!a[i])

        {

            printf("%c\n",i+'a');

            return 0;

        }

    cout<<"None"<<endl;

    return 0;

}




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

#include<stdio.h>



int cnt[26]={0}, ok=0;

char s[100005];



int main()

{

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

	scanf("%s", s);

	for(int i=0; s[i]; i++) cnt[s[i]-'a']++;

	for(int i=0; i<26; i++)

	{

		if(!cnt[i])

		{

			ok++;

			putchar(i+'a');

			break;

		}

	}

	if(!ok) printf("None");

	puts("");

	return 0;

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

using namespace std;

typedef long long ll;

typedef pair<int,int> pii;

#define F first

#define S second

#define ALL(a) begin(a), end(a)

int main()

{

    ios::sync_with_stdio(0);

    cin.tie(0);

    string s;

    cin >> s;

    bool vis[26] = {};

    for (char c : s)

        vis[c - 'a'] = 1;

    for (int i = 0; i < 26; ++i)

        if (!vis[i]) {

            cout << (char)('a' + i) << '\n';

            return 0;

        }

    cout << "None\n"; 

}


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

#include<stdio.h>



int cnt[26]={0}, ok=0;

char s[100005];



int main()

{

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

	scanf("%s", s);

	for(int i=0; s[i]; i++) cnt[s[i]-'a']++;

	for(int i=0; i<26; i++)

	{

		if(!cnt[i])

		{

			ok++;

			putchar(i+'a');

			break;

		}

	}

	if(!ok) printf("None");

	puts("");

	return 0;

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

#include <string>

#include <algorithm>

#include <set>



using namespace std;



int main(){

	string s;

	cin >> s;

	

	set<char> se;

	for(int i = 0; i < s.length(); i++) se.insert(s[i]);

	

	bool flag = false;

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

		if(se.count(char('a' + i)) == 0){

			flag = true;

			cout << char('a' + i) << endl;

			break;

		

		}

	

	}

	

	if(!flag) cout << "None" << endl;

	

	return 0;

}

/*

+++++ +++++ +++++ +++++

+++++ +++++ ++

>,[[-<->]]



*/


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

#include<stdio.h>



int cnt[26]={0}, ok=0;

char s[100005];



int main()

{

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

	scanf("%s", s);

	for(int i=0; s[i]; i++) cnt[s[i]-'a']++;

	for(int i=0; i<26; i++)

	{

		if(!cnt[i])

		{

			ok++;

			putchar(i+'a');

			break;

		}

	}

	if(!ok) printf("None");

	puts("");

	return 0;

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

#include <iostream>

using namespace std;

int main() {

	bool have[26];

	string s;

	cin >> s;

	for (int i = 0; i < 26; i++) have[i] = false;

	for (char i : s) have[i - 'a'] = true;

	for (int i = 0; i < 26; i++) if (!have[i]) {

		cout << char('a' + i) << endl;

		return 0;

	}

	cout << "None" << endl;

}


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

#include<stdio.h>



int cnt[26]={0}, ok=0;

char s[100005];



int main()

{

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

	scanf("%s", s);

	for(int i=0; s[i]; i++) cnt[s[i]-'a']++;

	for(int i=0; i<26; i++)

	{

		if(!cnt[i])

		{

			ok++;

			putchar(i+'a');

			break;

		}

	}

	if(!ok) printf("None");

	puts("");

	return 0;

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

#include <string>

using namespace std;



string s;

int a[26];



int main()

{

	cin>>s;

	int l=s.length();

	for(int i=0;i<l;i++) a[s[i]-'a']=1;

	for(int i=0;i<26;i++)

		if(a[i]==0) { cout<<(char)(i+'a')<<endl; return 0; }

	cout<<"None"<<endl;

	return 0;

}

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

bool b[26];

int main(){

    register char ch;

    while((ch=std::getchar())!='\n') b[ch-'a']=true;

    for(int i=0;i<26;++i) if(!b[i]){std::putchar(i+'a');std::putchar(10);return 0;}

    std::puts("None");

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

using namespace std;

int main(){

  string s;cin>>s;

  char a='a';

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

    if(!count(s.begin(),s.end(),a)){

      cout<<a;

      return 0;

    }

    a++;

  }

  cout<<"None";

}

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


#include<cstdio>

#include<queue>

#include<cstring>

#include<cmath>

using namespace std;

const int B = 300000+10;

const int N = 10000+10;

const int P = 26    +100;

char a[B];



int main()

{

    int num[P];

    while(scanf("%s",a)==1)

    {

        memset(num,0,sizeof num);

        int len=strlen(a);

        for(int i=0;i<len;i++)

        {

            num[a[i]-'a']++;



        }

        int pos=-1;

        for(int i=0;i<26;i++)

        {

            if(num[i]==0)

            {

                pos=i;

                break;

            }

        }



        if(pos==-1)

        {

            printf("None\n");

        }

        else

        {

            printf("%c\n",'a'+pos);

        }



    }

return 0;

}