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

using namespace std;



#define trace(...) __f( #__VA_ARGS__ , __VA_ARGS__ )

template <typename Arg1>

void __f( const char* name , Arg1&& arg1 ) {

        cerr << name << " : " << arg1 << "\n";

}

template <typename Arg1, typename... Args>

void __f( const char* na , Arg1&& arg1 , Args&&... args ) {

        const char* c = strchr( na + 1 , ',' );

        cerr.write( na , c - na ) << " : " << arg1 << " , ";

        __f( c + 1 , args... );

}

#define endl "\n"

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

#define Unique(V) sort(all(V)),V.erase(unique(all(V)),V.end())

#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

typedef long long int LL;

typedef pair <int,int> pii;

const int MOD = 1e9 + 7;

const int inf = 1e9;

const double EPS = 1e-9;

const double PI = acos(-1.0);

const long long INF = 1e18;

const int N = 1e5 + 5;



int a[ N ];



int main( ) {

        IO;

        #ifdef LOCAL

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

        #endif // LOCAL

        int n;

        cin >> n;

        for( int i = 1; i <= n; i++ ) cin >> a[i];

        sort( a + 1 , a + n + 1 );

        int ans = 0;

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

                int lo = 1 , hi = n , ret = 0 , key = i;

                while( lo <= hi ) {

                        int mid = ( lo + hi ) >> 1;

                        if( a[mid] >= key ) ret = mid , hi = mid - 1;

                        else if( a[mid] < key ) lo = mid + 1;

                }

                int big = n - ret + 1;

                int small = n - big;

                if( big == small ) ans++;

        }

        cout << ans << endl;

        return 0;

}


















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

using namespace std;



int main() {

	int n;

	cin >> n;

	vector<int> v(n);

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

		cin >> v[i];

	}

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

	int m = n/2;

	cout << v[m] - v[m-1];

	return 0;

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

using namespace std;



#define trace(...) __f( #__VA_ARGS__ , __VA_ARGS__ )

template <typename Arg1>

void __f( const char* name , Arg1&& arg1 ) {

        cerr << name << " : " << arg1 << "\n";

}

template <typename Arg1, typename... Args>

void __f( const char* na , Arg1&& arg1 , Args&&... args ) {

        const char* c = strchr( na + 1 , ',' );

        cerr.write( na , c - na ) << " : " << arg1 << " , ";

        __f( c + 1 , args... );

}

#define endl "\n"

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

#define Unique(V) sort(all(V)),V.erase(unique(all(V)),V.end())

#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

typedef long long int LL;

typedef pair <int,int> pii;

const int MOD = 1e9 + 7;

const int inf = 1e9;

const double EPS = 1e-9;

const double PI = acos(-1.0);

const long long INF = 1e18;

const int N = 1e5 + 5;



int a[ N ];



int main( ) {

        IO;

        #ifdef LOCAL

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

        #endif // LOCAL

        int n;

        cin >> n;

        for( int i = 1; i <= n; i++ ) cin >> a[i];

        sort( a + 1 , a + n + 1 );

        int ans = 0;

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

                int lo = 1 , hi = n , ret = 0 , key = i;

                while( lo <= hi ) {

                        int mid = ( lo + hi ) >> 1;

                        if( a[mid] >= key ) ret = mid , hi = mid - 1;

                        else if( a[mid] < key ) lo = mid + 1;

                }

                int big = n - ret + 1;

                int small = n - big;

                if( big == small ) ans++;

        }

        cout << ans << endl;

        return 0;

}


















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



using namespace std;

typedef long long ll;

const ll N= 1e5+7;

ll l, n , r ,t ,k , ans , x , y , a, b, c ,d,sum , cntr, now , xnum;

int arr[N];

vector<ll>v;



int main()

{

    ios_base::sync_with_stdio(0);

    cin.tie(0);

    cin >>n;

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

    {

        cin >> x;

        v.push_back(x);

    }

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

    cout << v[n/2] - v[(n/2)-1] <<"\n";

    return 0;

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

using namespace std;



#define trace(...) __f( #__VA_ARGS__ , __VA_ARGS__ )

template <typename Arg1>

void __f( const char* name , Arg1&& arg1 ) {

        cerr << name << " : " << arg1 << "\n";

}

template <typename Arg1, typename... Args>

void __f( const char* na , Arg1&& arg1 , Args&&... args ) {

        const char* c = strchr( na + 1 , ',' );

        cerr.write( na , c - na ) << " : " << arg1 << " , ";

        __f( c + 1 , args... );

}

#define endl "\n"

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

#define Unique(V) sort(all(V)),V.erase(unique(all(V)),V.end())

#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

typedef long long int LL;

typedef pair <int,int> pii;

const int MOD = 1e9 + 7;

const int inf = 1e9;

const double EPS = 1e-9;

const double PI = acos(-1.0);

const long long INF = 1e18;

const int N = 1e5 + 5;



int a[ N ];



int main( ) {

        IO;

        #ifdef LOCAL

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

        #endif // LOCAL

        int n;

        cin >> n;

        for( int i = 1; i <= n; i++ ) cin >> a[i];

        sort( a + 1 , a + n + 1 );

        int ans = 0;

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

                int lo = 1 , hi = n , ret = 0 , key = i;

                while( lo <= hi ) {

                        int mid = ( lo + hi ) >> 1;

                        if( a[mid] >= key ) ret = mid , hi = mid - 1;

                        else if( a[mid] < key ) lo = mid + 1;

                }

                int big = n - ret + 1;

                int small = n - big;

                if( big == small ) ans++;

        }

        cout << ans << endl;

        return 0;

}


















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



using namespace std;



int main(int qtd, char* nome[])

{

    ios::sync_with_stdio(false);

    cin.tie(0);



    int n;

    cin >> n;

    int d[n];

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

        cin >> d[i];

    sort(d, d+n);

    int ans = n%2? 0: abs(d[n/2] - d[n/2-1]);

    cout << ans << endl;



    return 0;

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

using namespace std;



typedef unsigned long long ull;

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

typedef pair<double, double> pdd;

const ull mod = 1e9 + 7;

#define REP(i,n) for(int i=0;i<(int)n;++i)



//debug

#define dump(x)  cerr << #x << " = " << (x) << endl;

#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;



template<class S, class T> ostream& operator << (ostream& os, const pair<S, T> v){

  os << "(" << v.first << ", " << v.second << ")"; return os;

}

template<class T> ostream& operator << (ostream& os, const vector<T> v){

  for(int i = 0; i < v.size(); i++){if(i > 0){os << " ";} os << v[i];} return os;

}

template<class T> ostream& operator << (ostream& os, const vector<vector<T>> v){

  for(int i = 0; i < v.size(); i++){if(i > 0){os << endl;} os << v[i];} return os;

}



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);



    ll N;

    cin >> N;

    vector<ll> d(N);

    REP(i, N) cin >> d[i];



    ll res = 0;

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

    REP(K, 101010){

    	ll x = d.end() - lower_bound(d.begin(), d.end(), K);

    	ll y = N - x;

    	if(x == y) res++;

    }

    cout << res << endl;

    return 0;

}

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

using namespace std;



typedef unsigned long long ull;

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

typedef pair<double, double> pdd;

//const ull mod = 1e9 + 7;

const ll mod = 1e9 + 7;

#define REP(i,n) for(int i=0;i<(int)n;++i)



// debug

#define dump(x)  cerr << #x << " = " << (x) << endl;

#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;



template<class S, class T> ostream& operator << (ostream& os, const pair<S, T> v){

  os << "(" << v.first << ", " << v.second << ")"; return os;

}

template<class T> ostream& operator << (ostream& os, const vector<T> v){

  for(int i = 0; i < (int)v.size(); i++){if(i > 0){os << " ";} os << v[i];} return os;

}

template<class T> ostream& operator << (ostream& os, const vector<vector<T>> v){

  for(int i = 0; i < (int)v.size(); i++){if(i > 0){os << endl;} os << v[i];} return os;

}

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }

template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }



// conversion number to bit

string num2bit(ll num, ll len){

  string bit = "";

  REP(i, len){

    bit += char('0'+(num>>i & 1));

  }

  return bit;

}



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);



    ll N;

    cin >> N;

    vector<ll> d(N);

    REP(i, N) cin >> d[i];

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

    cout << max(d[N/2]-d[N/2-1], 0ll) << endl;

    return 0;

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

typedef int64_t Int;

using namespace std;



int main(){

    string S; int Q;

    cin >> S >> Q;



    vector<int> T(200010), F(200010); vector<char> C(200010);

    

    bool rev = false;

    rep(q, Q){

        cin >> T[q];

        if(T[q] == 1) rev = !rev;

        if(T[q] == 2) cin >> F[q] >> C[q];

    }



    bool head = true; string left, right;

    rep(q, Q){

        if(!rev){

            if(T[q] == 1) head = !head;

            if(T[q] == 2){

                if((F[q] == 1 && head) || (F[q] == 2 && !head)) left = C[q] + left;

                if((F[q] == 2 && head) || (F[q] == 1 && !head)) right = right + C[q];  

            }

        } else {

            if(T[q] == 1) head = !head;

            if(T[q] == 2){

                if((F[q] == 1 && head) || (F[q] == 2 && !head)) left = left + C[q];

                if((F[q] == 2 && head) || (F[q] == 1 && !head)) right = C[q] + right;  

            }

        }

    }



    if(rev){

        reverse(S.begin(), S.end());

        cout << right+ S + left << endl; return 0;

    } else {

        cout << left + S + right << endl; return 0;

    }

}


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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

typedef int64_t Int;

using namespace std;

 

int main(){

    string S; int Q;

    cin >> S >> Q;



    deque<char> DQ;

    rep(i, S.length()) DQ.push_back(S[i]);

 

    bool head = true;

    rep(q, Q){

        int T; cin >> T;

 

        if(T == 1) head = !head;

        if(T == 2){

            int F; char C; cin >> F >> C;

            if((F == 1 && head) || (F == 2 && !head)) DQ.push_front(C);

            if((F == 2 && head) || (F == 1 && !head)) DQ.push_back(C);  

        }

    }



    string ans;

    while(!DQ.empty()) {ans.push_back(DQ.front()); DQ.pop_front();}

 

    if(!head) reverse(ans.begin(), ans.end());

    cout << ans << endl;

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



#define rep(i, n) for (int i = 0; i < (n); i++)

using namespace std;

typedef long long ll;

const int N = 2 * 1e5 + 3;



int main() {

  vector<char> cfront(N), cback(N);

  string s;

  int q, t, f, cnt = 0, fi = 0, bi = 0;

  char c;

  cin >> s >> q;

  rep(i, q) {

    cin >> t;

    if (t == 1)

      cnt++;

    else {

      cin >> f >> c;

      if (f == 1) {

        if (cnt % 2 == 0)

          cfront[fi] = c, fi++;  // s = c + s;

        else

          cback[bi] = c, bi++;  // s = s + c;

      } else {

        if (cnt % 2 == 0)

          cback[bi] = c, bi++;  // s = s + c;

        else

          cfront[fi] = c, fi++;  // s = c + s;

      }

    }

  }

  cfront.resize(fi + 1);

  cback.resize(bi + 1);

  if (cnt % 2 != 0) {

    for (int i = bi - 1; i >= 0; --i) cout << cback[i];

    reverse(s.begin(), s.end());

    cout << s;

    rep(i, fi) cout << cfront[i];

  } else {

    for (int i = fi - 1; i >= 0; --i) cout << cfront[i];

    cout << s;

    rep(i, bi) cout << cback[i];

  }



  return 0;

}


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



#define rep(i, n) for (int i = 0; i < (n); i++)

using namespace std;

typedef long long ll;

const int N = 2 * 1e5 + 3;



int main() {

  string s;

  int q, x, f, cnt = 0;

  char c;

  cin >> s >> q;



  deque<int> que;

  rep(i, s.size()) que.push_back(s[i]);



  rep(i, q) {

    cin >> x;

    if (x == 1)

      cnt++;

    else {

      cin >> f >> c;

      if (cnt % 2 == 0) {

        if (f == 1) {

          que.push_front(c);

        } else {

          que.push_back(c);

        }

      } else {

        if (f == 1) {

          que.push_back(c);

        } else {

          que.push_front(c);

        }

      }

    }

  }



  char ac;

  while (que.size()) {

    if (cnt % 2 == 1)

      ac = que.back(), que.pop_back();

    else

      ac = que.front(), que.pop_front();

    cout << ac;

  }

  cout << endl;



  return 0;

}
// Slower C++ solution:
/*

By Snickeen

*/

#include<bits/stdc++.h>

//#pragma comment(linker, "/STACK:102400000,102400000")

#include <stdio.h>

#include <iostream>

#include <iomanip>

#include <fstream>

#include <string.h>

#include <stdlib.h>

#include <time.h>

#include <limits.h>

#include <math.h>

#include <algorithm>

#include <deque>

#include <queue>

#include <stack>

#include <list>

#include <map>

#include <set>

#include <utility>

#include <sstream>

#include <complex>

#include <string>

#include <vector>

#include <bitset>

#include <functional>

using namespace std;

typedef long long LL;

typedef unsigned long long ULL;

typedef double db;

typedef long double ldb;

#define rep(i,a,b) for(i=a;i<b;i++)

#define repu(i,a,b) for(i=a;i<=b;i++)

#define repd(i,a,b) for(i=a;i>=b;i--)

#define repc(i,a,b,c) for(i=a;i<b;i+=c)

#define repcu(i,a,b,c) for(i=a;i<=b;i+=c)

#define repcd(i,a,b,c) for(i=a;i>=b;i-=c)

#define FIN freopen("input.in","r",stdin)

#define FOUT freopen("output.out","w",stdout)

#define CC(a) memset(a,0,sizeof(a))

#define MST(a,b) memset(a,b,sizeof(a))

#define PII pair<int,int>

#define PLL pair<LL,LL>

#define VI vector<int>

#define VL vector<LL>

#define VII vector<PII >

#define VLL vector<PLL >

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

#define mp make_pair

#define pb push_back

#define pf push_front

#define FF first

#define SS second



template<typename T>inline void gn(T &x){

	x=0;T f=1;char ch=getchar();

	while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}

	while(isdigit(ch)){x=x*10+ch-'0';ch=getchar();}

	x*=f;

}

template<typename T>inline void gt(T x){

	if(!x)return;

	gt(x/10);putchar(x%10+'0');

}

 

const LL MAXN=1e5+10;

LL t,n,m,ans;

LL MOD=1e9+7,inf=0x1f1f1f1f;

db eps=1e-5;



string s[111];



int main()

{

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

	LL i,j,k,l,ca=0;

	cin>>n>>m;

	repu(i,1,n){

		cin>>s[i];

	} 

	repu(i,1,n){

		cout<<s[i]<<endl;

		cout<<s[i]<<endl;

		

	}

	return 0;

}

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

#include<cmath>

#include<cstring>

using namespace std;

int main(){

    char a[105];

    int h,w;

    while(~scanf("%d%d",&h,&w)){

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

            scanf("%s",a);

            puts(a);

            puts(a);

        }

    }

    return 0;

}
// Slower C++ solution:


#include<bits/stdc++.h>

#define lln long long int

#define llu unsigned lln

#define sc(n) scanf("%d",&n);

#define scl(n) scanf("%lld",&n);

#define scd(n) scanf("%lf",&n);

#define pf(res) printf("%d\n",res);

#define pfl(res) printf("%lld\n",res);

#define pfd(res) printf("%lf\n",res);

#define maxii 200005

using namespace std;

typedef pair<int,int> pii;

typedef pair<lln,lln> pll;

 vector<int> vi[maxii];

 vector<int>::iterator child;

typedef vector<lln> vl;

typedef vector<pii> vii;

typedef vector<pll> vll;





int arr[maxii];

int arr2[maxii];





int main()

{

  string a[105];

  int n,m;

  cin>>n>>m;

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

  {

      cin>>a[i];

  }

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

  {

      cout<<a[i]<<endl;

      cout<<a[i]<<endl;

  }



}










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

#include <cstdio>

#include <cstdlib>

#include <string.h>

#include <math.h>



using namespace std;



int main()

{

    int a,b,c[105][105],d,e,f,g,i;

    char s[105];

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

    for(i=0;i<a;i++)

    {

            scanf("%s",s);

            printf("%s\n",s);

            printf("%s\n",s);

    }

    return 0;

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

#include <cstdio>

#include <cstring>

#include <string>

using namespace std;



int main()

{

	int w,h;

	cin>>w>>h;

	string s[105];

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

	{

		cin>>s[i];

	}

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

	{

		cout<<s[i]<<endl;

		cout<<s[i]<<endl;

	}

	return 0;

}

 

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



int main() {

	char str[110][110];

	int n, m;

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

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

		scanf("%s", str[i]);

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

		puts(str[i]), puts(str[i]);

	return 0;

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

using namespace std;

typedef long long ll;

int main() {ll h,w;cin>>h>>w;string s;while(h--) {cin>>s; cout<<s<<endl<<s<<endl;}return 0;

}


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



int main() {

	char str[110][110];

	int n, m;

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

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

		scanf("%s", str[i]);

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

		puts(str[i]), puts(str[i]);

	return 0;

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

#include <math.h>

#include <string.h>

#include <algorithm>

#include <iostream>

#include <string>

#include <time.h>

#include <queue>

#include <list>

#include <string.h>

#define sf scanf

#define pf printf

#define lf double

#define ll long long

#define p123 printf("123\n");

#define pn printf("\n");

#define pk printf(" ");

#define p(n) printf("%d",n);

#define pln(n) printf("%d\n",n);

#define s(n) scanf("%d",&n);

#define ss(n) scanf("%s",n);

#define ps(n) printf("%s",n);

#define sld(n) scanf("%lld",&n);

#define pld(n) printf("%lld",n);

#define slf(n) scanf("%lf",&n);

#define plf(n) printf("%lf",n);

#define sc(n) scanf("%c",&n);

#define pc(n) printf("%c",n);

#define gc getchar();

#define re(n,a) memset(n,a,sizeof(n));

#define len(a) strlen(a)

#define LL long long

#define eps 1e-6

using namespace std;

const double pi = 3.1415926535;

/*

https://codeforces.com/contest/1106/problems

https://codeforces.com/contest/1106/submit

*/

const ll mod = 1e9+7;

//快速幂 (a^b)%mod

//如果求逆元，则b = mod-2;

ll pow_quick(ll a,ll b){

    ll r = 1,base = a;

    while(b){

        if(b & 1){

            r *= base;

            r %= mod;

        }

        base *= base;

        base %= mod;

        b >>= 1;

    }

    return r;

}



char a[1000000];

int main(){

    int h,w;

    s(h) s(w)

    gc

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

        ss(a) gc

        puts(a);

        puts(a);

    }

	return 0;

 }/*

int t[100000];

int main(){

    int n = 0;

    s(n)

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

        s(t[i])

    }

    int m;

    s(m)





	return 0;

 }

*/


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



int main() {

	char str[110][110];

	int n, m;

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

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

		scanf("%s", str[i]);

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

		puts(str[i]), puts(str[i]);

	return 0;

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

using namespace std;

#define ll long long

#define pi acos(-1,0)

int main()

{

   int m,n;

   cin>>m>>n;

   string s;

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

   {

       cin>>s;

       cout<<s<<endl;

       cout<<s<<endl;

   }

   return 0;

   // 2 2 4 1 3

   //

}


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



int main() {

	char str[110][110];

	int n, m;

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

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

		scanf("%s", str[i]);

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

		puts(str[i]), puts(str[i]);

	return 0;

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

using namespace std;



int main() {

    int h,w;

    string s;

    scanf("%d %d",&h,&w);

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

        cin>>s;

        cout<<s<<'\n'<<s<<'\n';

    }

    return 0;

}

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



int main() {

	char str[110][110];

	int n, m;

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

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

		scanf("%s", str[i]);

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

		puts(str[i]), puts(str[i]);

	return 0;

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

using namespace std;



int main() {

	int x, y;

	cin >> x >> y;

	string str, temp[1001];

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

		cin >> str;

		temp[i] = str;

	}

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

		cout << temp[i] << endl;

		cout << temp[i] << endl;

	}



}

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



int main() {

	char str[110][110];

	int n, m;

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

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

		scanf("%s", str[i]);

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

		puts(str[i]), puts(str[i]);

	return 0;

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

using namespace std;

int main()

{

    int a,b,i;

    cin>>a>>b;

    string s[a];

    for(i=0;i<a;i++)

        cin>>s[i];

    for(i=0;i<a;i++)

        {

            cout<<s[i]<<endl<<s[i]<<endl;

        }



    return 0;

}






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



int main() {

	char str[110][110];

	int n, m;

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

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

		scanf("%s", str[i]);

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

		puts(str[i]), puts(str[i]);

	return 0;

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

#include <cstdio>

#include <cstring>

#include <string>

using namespace std;



int main()

{

	int w,h;

	cin>>w>>h;

	string s[105];

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

	{

		cin>>s[i];

	}

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

	{

		cout<<s[i]<<endl;

		cout<<s[i]<<endl;

	}

	return 0;

}

 

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

#include <stdlib.h>

#include <string.h>

struct chu

{

    char t[101];

}s[101];

int main()

{

      int a,b;

      while(~scanf("%d%d",&a,&b))

      {

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

         {

                scanf("%s",s[i].t);

         }

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

         {

             printf("%s\n",s[j].t);

             printf("%s\n",s[j].t);

         }

      }

    return 0;

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

using namespace std;

typedef long long ll;

int main() {ll h,w;cin>>h>>w;string s;while(h--) {cin>>s; cout<<s<<endl<<s<<endl;}return 0;

}


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

#include <stdlib.h>

#include <string.h>

struct chu

{

    char t[101];

}s[101];

int main()

{

      int a,b;

      while(~scanf("%d%d",&a,&b))

      {

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

         {

                scanf("%s",s[i].t);

         }

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

         {

             printf("%s\n",s[j].t);

             printf("%s\n",s[j].t);

         }

      }

    return 0;

}