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

#include <cstring>



using namespace std;



#define rep1(i,x) for(int i=1;i<=(x);++i)



int a[100001];

int memo[100001];

int start[100001];



int main()

{

    int n, k;

    while (scanf("%d %d", &n, &k), n || k) {

        memset(a, 0, sizeof(a));

        memset(memo, 0, sizeof(memo));

        memset(start, 0, sizeof(start));



        bool f = false;



        rep1(i, k) {

            int tmp; scanf("%d", &tmp);

            if (tmp == 0) f = true;

            else a[tmp] = true;

        }



        rep1(i, n) {

            if (a[i]) {

                if (i - 1 >= 0 && a[i - 1]) {

                    start[i] = start[i - 1];

                    memo[start[i]]++;

                } else {

                    start[i] = i;

                    memo[start[i]]++;

                }

            }

        }



        int ma = 0;

        int now = -1;



        rep1(i, n) {

            if (a[i]) {

                if (now == start[i]) continue;

                if (ma < memo[start[i]]) {

                    ma = memo[start[i]];

                    now = start[i];

                }

            } else if (f) {

                int v;

                if (i + 1 <= n && a[i - 1] && a[i + 1]) {

                    v = memo[start[i - 1]] + memo[start[i + 1]] + 1;

                    if (ma < v) {

                        ma = v;

                        now = start[i + 1];

                    }

                } else if (a[i - 1]) {

                    v = memo[start[i - 1]] + 1;

                    if (ma < v) {

                        ma = v;

                        now = start[i - 1];

                    }

                } else if (i + 1 <= n && a[i + 1]) {

                    v = memo[start[i + 1]] + 1;

                    if (ma < v) {

                        ma = v;

                        now = start[i + 1];

                    }

                }

            }

        }



        printf("%d\n", ma);

    }

}

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

#include <algorithm>



using namespace std;



#define rep1(i,x) for(int i=1;i<=(x);++i)

#define chmax(a,b) a=max(a,b)



int a[100001];

int memo[100001];

int start[100001];



int main()

{

    ios::sync_with_stdio(false);

    cin.tie(0);



	int n, k;

    while (cin >> n >> k, n || k) {

		fill_n(a, n, 0);

		fill_n(memo, n, 0);

		fill_n(start, n, 0);



		bool f = false;



		rep1(i, k) {

			int tmp; cin >> tmp;

			if (tmp == 0) f = true;

			else a[tmp] = true;

		}



		rep1(i, n) {

			if (a[i]) {

				if (a[i - 1]) {

					start[i] = start[i - 1];

					memo[start[i]]++;

				} else {

					start[i] = i;

					memo[start[i]]++;

				}

			}

		}



		int ma = 0;



		rep1(i, n) {

			if (a[i]) {

				chmax(ma, memo[start[i]]);

			} else if (f) {

				if (i + 1 <= n) {

					chmax(ma, memo[start[i - 1]] + memo[start[i + 1]] + 1);

				} else {

					chmax(ma, memo[start[i - 1]] + 1);

				}

			}

		}



        cout << ma << endl;

	}

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

#include <cstring>



using namespace std;



#define rep1(i,x) for(int i=1;i<=(x);++i)



int a[100001];

int memo[100001];

int start[100001];



int main()

{

	int n, k;

	while (scanf("%d %d", &n, &k), n || k) {

		memset(a, 0, sizeof(a));

		memset(memo, 0, sizeof(memo));

		memset(start, 0, sizeof(start));



		bool f = false;



		rep1(i, k) {

			int tmp; scanf("%d", &tmp);

			if (tmp == 0) f = true;

			else a[tmp] = true;

		}



		rep1(i, n) {

			if (a[i]) {

				if (i - 1 >= 0 && a[i - 1]) {

					start[i] = start[i - 1];

					memo[start[i]]++;

				} else {

					start[i] = i;

					memo[start[i]]++;

				}

			}

		}



		int ma = 0;

		int now = -1;



		rep1(i, n) {

			if (a[i]) {

				if (now == start[i]) continue;

				if (ma < memo[start[i]]) {

					ma = memo[start[i]];

					now = start[i];

				}

			} else if (f) {

				int v;

				if (i + 1 <= n && a[i - 1] && a[i + 1]) {

					v = memo[start[i - 1]] + memo[start[i + 1]] + 1;

					if (ma < v) {

						ma = v;

						now = start[i + 1];

					}

				} else if (a[i - 1]) {

					v = memo[start[i - 1]] + 1;

					if (ma < v) {

						ma = v;

						now = start[i - 1];

					}

				} else if (i + 1 <= n && a[i + 1]) {

					v = memo[start[i + 1]] + 1;

					if (ma < v) {

						ma = v;

						now = start[i + 1];

					}

				}

			}

		}



		printf("%d\n", ma);

	}

}

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

#include <algorithm>



using namespace std;



#define rep1(i,x) for(int i=1;i<=(x);++i)

#define chmax(a,b) a=max(a,b)



int a[100001];

int memo[100001];

int start[100001];



int main()

{

    ios::sync_with_stdio(false);

    cin.tie(0);



	int n, k;

    while (cin >> n >> k, n || k) {

		fill_n(a, n, 0);

		fill_n(memo, n, 0);

		fill_n(start, n, 0);



		bool f = false;



		rep1(i, k) {

			int tmp; cin >> tmp;

			if (tmp == 0) f = true;

			else a[tmp] = true;

		}



		rep1(i, n) {

			if (a[i]) {

				if (a[i - 1]) {

					start[i] = start[i - 1];

					memo[start[i]]++;

				} else {

					start[i] = i;

					memo[start[i]]++;

				}

			}

		}



		int ma = 0;



		rep1(i, n) {

			if (a[i]) {

				chmax(ma, memo[start[i]]);

			} else if (f) {

				if (i + 1 <= n) {

					chmax(ma, memo[start[i - 1]] + memo[start[i + 1]] + 1);

				} else {

					chmax(ma, memo[start[i - 1]] + 1);

				}

			}

		}



        cout << ma << endl;

	}

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

#define N 500009

using namespace std;

 

int n,m,q[N];

struct node{ double x,y,z; }a[N];

int main(){

	scanf("%d%d",&n,&m);

	int i,k,head=1,tail=0; double now=0,ans=0;

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

		scanf("%lf%lf",&a[i].x,&a[i].y);

		ans+=a[i].x*a[i].y;

		a[i].z=now=now+a[i].y;

		for (; head<=tail && a[k=q[head]].z<=now-m; head++)

			ans-=a[k].x*a[k].y;

		ans-=a[k].x*a[k].y;

		a[k].y=a[k].z-(now-m);

		ans+=a[k].x*a[k].y;

		for (; head<=tail && a[k=q[tail]].x>a[i].x; tail--){

			a[i].x=(a[i].x*a[i].y+a[k].x*a[k].y)/(a[i].y+a[k].y);

			a[i].y+=a[k].y;

		}

		q[++tail]=i;

		printf("%.10f\n",ans/m);

	}

	return 0;

}

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



const int maxn = 5e5 + 10;



int n, m, fnt, rar, s, x[maxn];

double ans, y[maxn];



int main() {

	scanf("%d%d", &n, &m);

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

		int t, v;

		scanf("%d%d", &t, &v);

		while(fnt < rar && s - x[fnt] >= m - v) {

			ans -= y[fnt];

			s -= x[fnt++];

		}

		if(s > m - v) {

			ans -= y[fnt];

			y[fnt] -= (s - m + v) * y[fnt] / x[fnt];

			ans += y[fnt];

			x[fnt] -= (s - m + v);

		}

		s = m;

		double k = 1. * t * v;

		ans += k;

		while(fnt < rar && y[rar - 1] * v >= k * x[rar - 1]) {

			v += x[--rar];

			k += y[rar];

		}

		x[rar] = v;

		y[rar++] = k;

		printf("%.12f\n", ans / m);

	}

	return 0;

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

#include<algorithm>

#include<vector>

#include<functional>

#include<string>

#include<cmath>

#include<map>

#include<set>

#include<queue>

#include<stack>

#include<cstdio>

using namespace std;

using ll = long long;

#define MOD (int)1e9 + 7

int main(){

  int n, m;

  cin >> n >> m;

  if(abs(n - m) > 1){

    cout << 0 << endl;

    return 0;

  }

  ll ans = 1;

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

    ans *= (i + 1);

    ans %= MOD;

  }

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

    ans *= (i + 1);

    ans %= MOD;

  }

  if(m == n){

    ans *= 2;

  }

  ans %= MOD;

  cout << ans << endl;

  return 0;

}

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



int main() { 

  long long  n, m, ans = 1;

  scanf("%Ld %Ld", &n, &m);

  if( n-m > 1 || m-n > 1){

    printf("%d\n", 0);

    return 0;

  }

  int i;

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

    ans *= (i + 1);

    ans %= 1000000007;

  }

  for(i = 0; i < m; i++){

    ans *= (i + 1);

    ans %= 1000000007;

  }

  if(n == m){

    ans *= 2;

  }

  ans %= 1000000007;

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

  return 0;

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

using namespace std;

const int mod=1e9+7;

int main(){

    int n,m;

    cin>>n>>m;

    long long p;

    if(abs(n-m)>1) cout<<0<<endl;

    else{

        long long  sum=1,cnt=1;

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

                sum*=i;

                sum%=mod;

        }

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

                cnt*=i;

                cnt%=mod;

        }

        p=cnt*sum%mod;

        if(m==n) p*=2;

        p%=mod;

        cout<<p<<endl;

    }

    return 0;

}


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

#include<algorithm>

#include<cmath>

#define MOD 1000000007

using namespace std;

long long n,m;

int main()

{

	scanf("%lld%lld",&n,&m);

	if(abs(n-m)>1) {puts("0");return 0;}

	long long n1=1,n2=1;

	for(long long i=2;i<=n;++i) n1=(n1*i)%MOD;

	for(long long i=2;i<=m;++i) n2=(n2*i)%MOD;

	if(n!=m) printf("%lld\n",n1*n2%MOD);

	else printf("%lld\n",n1*n2*2%MOD);

	return 0;

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

#include<cstdio>

#include<cmath>

using namespace std;

long long a[100002],n,m,p=1e9+7;

long long ksm(int a,int b,int p)

{

	long long ans=1;

	while(b)

	{

		if(b&1)

		{

			ans=ans*a%p;

		}

		a=a*a%p;

		b>>=1;

	}

	return ans;

}

long long c(long long n,long long m)

{

	if(m>n)

	{

		return 0;

	}

	return (((a[n]*ksm(a[m],p-2,p))%p*ksm(a[n-m],p-2,p))%p);

}

long long lucas(long long n,long long m)

{

	if(m==0)

	{

		return 1;

	}

	return (c(n%p,m%p)*lucas(n/p,m/p))%p;

}

int main()

{

	cin>>n>>m;

	if(abs(n-m)>1)

	{

		cout<<"0"<<endl;

		return 0;

	}

	a[0]=1;

	for(int i=1;i<=max(n,m);i++)

	{

		a[i]=(a[i-1]*i)%p;

	}

	if(n==m)

	{

		cout<<(2*a[n]*a[m])%p<<endl;

	}

	if(abs(n-m)==1)

	{

		cout<<(a[n]*a[m])%p<<endl;

	}

}

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

#define M 1000000007

typedef long long LL;



int main()

{		

	int n, m, d, i;

	LL f, t, ans;

	

	scanf("%d%d", &n, &m);

	if(n < m) n ^= m, m ^= n, n ^= m;

	d = n - m;

	if(d > 1){

		puts("0");

		return 0;

	}

	for(i = 1, f = 1; i < n; i++){

		f = f * (LL)i % M;

	}

	t = f * (LL)n % M;

	

	if(!d) ans = t * t * 2 % M;

	else ans = t * f % M;

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

			

	return 0;

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

#include <string>

#include <vector>

#include <algorithm>

#include <numeric>

#include <cmath>



using namespace std;



constexpr int64_t MOD = 1'000'000'007;

constexpr int     MAX =       100'005;



int64_t fac[MAX], finv[MAX], inv[MAX];



// テーブルを作る前処理

void COMinit() {

    fac[0] = fac[1] = 1;

    finv[0] = finv[1] = 1;

    inv[1] = 1;

    for (int i = 2; i < MAX; i++){

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

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

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

    }

}



// 二項係数計算

int64_t COM(int n, int k){

    if (n < k) return 0;

    if (n < 0 || k < 0) return 0;

    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;

}



int main(void) {

    int N, M;

    cin >> N >> M;

    if(N > M) swap(N, M);

    COMinit();

    if(N+1 == M) {

        cout << (fac[N] * fac[M]) % MOD << endl;

    } else if(N == M) {

        cout << ((fac[N] * fac[M]) % MOD * 2) % MOD << endl;

    } else {

        cout << 0 << endl;

    }

    return 0;

}


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

#include <vector>



using namespace std;



constexpr int64_t MOD = 1'000'000'007;



int main(void) {

    int N, M;

    cin >> N >> M;

    if(N > M) swap(N, M);



    if(N+1 < M) {

        cout << 0 << endl;

    } else {

        vector<int64_t> factrial(M+1);

        factrial[0] = 1;

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

            factrial[i] = (factrial[i-1] * i) % MOD;

        }

        int64_t ans = (factrial[N] * factrial[M]) % MOD;

        if(N == M) ans = (ans * 2) % MOD;

        cout << ans << endl;

    }

    return 0;

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

#include<algorithm>

#define DIV 100000

using namespace std;



long long d,S[100010];



int main(){

	long long n, m, k, t = 0;

	long long ans = 0;

	cin >> n >> m; S[0] = 0;

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

		cin >> d; S[i] = S[i - 1] + d;

	}

	while (m--){

		cin >> k;

		ans += abs(S[t] - S[t + k]);

		ans = ans%DIV;

		t += k;

	}

	cout << ans << endl;

}

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

#include<math.h>

#include <stdlib.h>

#define M 100000

using namespace std;





int n, m,l, p = 0 , result = 0;

int x[100010];



int main(){

	scanf("%d %d",&n,&m);

	x[0] = 0;

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

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

		x[i] += x[i - 1];

	}

	while (m--){

		scanf("%d", &l);

		result += abs(x[p + l] - x[p]);

		result %= M;

		p += l;

	}

	printf("%d\n", result);

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

#define MAX 100500



using namespace std;



int main(void){



  int n,m;

  long long int N, M[MAX],d[MAX];

  

  while(cin >> n ){



    cin >> m;



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

      M[i] = 0;

      d[i] = 0;

    }



    d[0] = 0;



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

      cin >> N;

      d[i] += d[i-1] + N;

      //  cout << "N = " << N << " d[i] = " << d[i] << endl;

    }



    for(int i = 0 ; i < m ; i++) cin >> M[i];



    long long int sum = 0,now = 0;

    

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

     

      // cout << endl << "i = " << i << " now = "  << now << endl;//



      //  cout <<"now + M[i] = " << now + M[i]<<   " d[now + M[i]] = " << d[now + M[i]] << " d[now] =  " <<  d[now] << endl;//

      



      if(M[i] >= 0){

	sum += d[now + M[i]] - d[now];  

	//	cout << "! N = " << d[now + M[i]] - d[now] << endl;//

      }

      else{

	sum += d[now] - d[now + M[i]];

	//	cout << "? N = " <<  d[now] - d[now + M[i]]  << endl;//

      }



      now = now + M[i];//



    }

    cout << sum % 100000 << endl;

  }



  return 0;

}

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

using namespace std;

int shu[100000];

long long co[100001];

int main (){

  int n,m;

  cin>>n>>m;

  for(int i=0;i<n-1;i++) cin>>shu[i];

  for(int i=0;i<=n;i++) co[i]=0;

  int ima=0;

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

    int s,e;

    int a;

    cin>>a;

    s=min(ima+a,ima);

    e=max(ima+a,ima);

    co[s]++;

    co[e]--;

    ima+=a;

  }

  for(int i=1;i<n;i++) co[i]+=co[i-1];

  long long sumco=0;

  for(int i=0;i<n-1;i++) sumco+=co[i]*shu[i],sumco%=100000;

  cout<<sumco<<endl;

  return 0;

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



using namespace std; 

int main()

{

string s;

cin>>s;



 for(int i=0;i<s.length();i++){

 	

 	if(s[i]==','){

 		cout<<" ";

	 }

	 else

	 cout<<s[i];

 }

}

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

int main(){



char s[100];



	scanf("%[^\n]", s);

	

	for(int i=0; s[i]!='\0';i++){

		if (s[i] == ','){

			printf(" ", s[i]);

		}

		else{

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

		}

	}

	

return 0;

}
// Slower C++ solution:
#pragma GCC optimize ("O3")

///#include<bits/stdc++.h>

#include<iostream>

#include<string>

using namespace std;







/// Info.

///****************************************************************************************************************************************///

/// Coder               : BAHAA El_DEEN OSAMA SAYED.

/// Problem name        : A - Haiku

/// Method              : IM-string

/// Date                : 23/2/2020

///****************************************************************************************************************************************///





#define rep0(i,x)         for(int i=0; i<=x ;++i)

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

#define mm(v,d)          memset(v,d,sizeof(v))

#define lp(i,v)          for(int i=0;i<sizeof(v);++i)

#define lpi(i,j,n)       for(int i=(j);i>=(int)n;++i)

#define lpd(i,j,n)       for(int i=(j);i>=(int)n;--i)

#define MP               make_pair

#define SZ(v)            ((int) ( (v).size() ) )

#define ull              unsigned long long

#define ll               long long

#define pi               3.1415926536

#define oo               1e9

#define OO               1e18

#define Fx(n)            fixed<<setprecision(n)

#define FasterIO           std::ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)

#define RE0              return 0

#define RE1              return 1

#define mp(a,b)          make_pair(a,b)

#define X                first

#define Y                second

#define pii              pair(int a, int b)

#define rep1(i,x)        for(int i=1;i<x;++i)

#define rep2(i,x)        for(int i=2;i<x;++i)

#define RE               return

//#define LD               long double

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





const  int  N   = (int) 1e5+100;

const  int  M   = (int) 1e4+4;

const  int  INF = (int) 0x3f3f3f3f;

///const double ESP = 1e-7;

///const ll MOD=1e8+9;





string str;



int main()

{

FasterIO;



cin>> str;

rep0(i,str.size())

{

    if(str[i]==',')

        str[i]= ' ' ;

}



cout << str;







 RE0;}


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

int main(){



char s[100];



	scanf("%[^\n]", s);

	

	for(int i=0; s[i]!='\0';i++){

		if (s[i] == ','){

			printf(" ", s[i]);

		}

		else{

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

		}

	}

	

return 0;

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



using namespace std; 

int main()

{

string s;

cin>>s;



 for(int i=0;i<s.length();i++){

 	

 	if(s[i]==','){

 		cout<<" ";

	 }

	 else

	 cout<<s[i];

 }

}

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



int main (){

	char a[19];

	scanf("%[^\n]", &a);

	for (int i=0; a[i]!= '\0'; i++){

		if (a[i]==','){

			printf(" ");

		}

		else {

			printf("%c", a[i]);

		}

	}

	return 0;

}
// Slower C++ solution:
#pragma GCC optimize ("O3")

///#include<bits/stdc++.h>

#include<iostream>

#include<string>

using namespace std;







/// Info.

///****************************************************************************************************************************************///

/// Coder               : BAHAA El_DEEN OSAMA SAYED.

/// Problem name        : A - Haiku

/// Method              : IM-string

/// Date                : 23/2/2020

///****************************************************************************************************************************************///





#define rep0(i,x)         for(int i=0; i<=x ;++i)

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

#define mm(v,d)          memset(v,d,sizeof(v))

#define lp(i,v)          for(int i=0;i<sizeof(v);++i)

#define lpi(i,j,n)       for(int i=(j);i>=(int)n;++i)

#define lpd(i,j,n)       for(int i=(j);i>=(int)n;--i)

#define MP               make_pair

#define SZ(v)            ((int) ( (v).size() ) )

#define ull              unsigned long long

#define ll               long long

#define pi               3.1415926536

#define oo               1e9

#define OO               1e18

#define Fx(n)            fixed<<setprecision(n)

#define FasterIO           std::ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)

#define RE0              return 0

#define RE1              return 1

#define mp(a,b)          make_pair(a,b)

#define X                first

#define Y                second

#define pii              pair(int a, int b)

#define rep1(i,x)        for(int i=1;i<x;++i)

#define rep2(i,x)        for(int i=2;i<x;++i)

#define RE               return

//#define LD               long double

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





const  int  N   = (int) 1e5+100;

const  int  M   = (int) 1e4+4;

const  int  INF = (int) 0x3f3f3f3f;

///const double ESP = 1e-7;

///const ll MOD=1e8+9;





string str;



int main()

{

FasterIO;



cin>> str;

rep0(i,str.size())

{

    if(str[i]==',')

        str[i]= ' ' ;

}



cout << str;







 RE0;}


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



int main (){

	char a[19];

	scanf("%[^\n]", &a);

	for (int i=0; a[i]!= '\0'; i++){

		if (a[i]==','){

			printf(" ");

		}

		else {

			printf("%c", a[i]);

		}

	}

	return 0;

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



using namespace std; 

int main()

{

string s;

cin>>s;



 for(int i=0;i<s.length();i++){

 	

 	if(s[i]==','){

 		cout<<" ";

	 }

	 else

	 cout<<s[i];

 }

}

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



int main(){

char a[101];

int k=101;

scanf("%s",&a);



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

	if(a[i]==','){

		a[i]=' ';

	}

}

	printf("%s",a);

	puts("");

return 0;	

}
// Slower C++ solution:
#pragma GCC optimize ("O3")

///#include<bits/stdc++.h>

#include<iostream>

#include<string>

using namespace std;







/// Info.

///****************************************************************************************************************************************///

/// Coder               : BAHAA El_DEEN OSAMA SAYED.

/// Problem name        : A - Haiku

/// Method              : IM-string

/// Date                : 23/2/2020

///****************************************************************************************************************************************///





#define rep0(i,x)         for(int i=0; i<=x ;++i)

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

#define mm(v,d)          memset(v,d,sizeof(v))

#define lp(i,v)          for(int i=0;i<sizeof(v);++i)

#define lpi(i,j,n)       for(int i=(j);i>=(int)n;++i)

#define lpd(i,j,n)       for(int i=(j);i>=(int)n;--i)

#define MP               make_pair

#define SZ(v)            ((int) ( (v).size() ) )

#define ull              unsigned long long

#define ll               long long

#define pi               3.1415926536

#define oo               1e9

#define OO               1e18

#define Fx(n)            fixed<<setprecision(n)

#define FasterIO           std::ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)

#define RE0              return 0

#define RE1              return 1

#define mp(a,b)          make_pair(a,b)

#define X                first

#define Y                second

#define pii              pair(int a, int b)

#define rep1(i,x)        for(int i=1;i<x;++i)

#define rep2(i,x)        for(int i=2;i<x;++i)

#define RE               return

//#define LD               long double

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





const  int  N   = (int) 1e5+100;

const  int  M   = (int) 1e4+4;

const  int  INF = (int) 0x3f3f3f3f;

///const double ESP = 1e-7;

///const ll MOD=1e8+9;





string str;



int main()

{

FasterIO;



cin>> str;

rep0(i,str.size())

{

    if(str[i]==',')

        str[i]= ' ' ;

}



cout << str;







 RE0;}


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



int main(){

char a[101];

int k=101;

scanf("%s",&a);



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

	if(a[i]==','){

		a[i]=' ';

	}

}

	printf("%s",a);

	puts("");

return 0;	

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



using namespace std; 

int main()

{

string s;

cin>>s;



 for(int i=0;i<s.length();i++){

 	

 	if(s[i]==','){

 		cout<<" ";

	 }

	 else

	 cout<<s[i];

 }

}

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

#include <string.h>  

   

int main()  

{  

    char str[105];  

    scanf("%s",str);

    char ch = ' ';  

      

    

    for(int i = 0; i < strlen(str); i++){  

        if(str[i] == ',')  

            str[i] = ch;  

    }  

      

     

    printf("%s", str);  

          

    return 0;  

}