jiahuimbzuai/CoQuIR huggingface dataset:
//  [java]
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author @MaxHeap
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Dolphine solver = new Dolphine();
        solver.solve(1, in, out);
        out.close();
    }

    static class Dolphine {
        public void solve(int testNumber, FastReader fs, PrintWriter pw) {
            String s = fs.next();
            pw.println(s.replaceAll(",", " "));
        }

    }

    static class FastReader {
        BufferedReader bf;
        StringTokenizer st;

        public FastReader(InputStream is) {
            bf = new BufferedReader(new InputStreamReader(is));
            st = null;
        }

        public String next() {
            try {
                while (st == null || !st.hasMoreTokens()) {
                    String line = bf.readLine();
                    if (line == null) return null;
                    st = new StringTokenizer(line);
                }
            } catch (Exception e) {
            }

            return st.nextToken();
        }

    }
}
//  [java]
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner as = new Scanner(System.in);
		String st = as.next();
		String a,b,c;
		a=b=c= "";
		for(int i=0;i<5;i++){
			a+=String.valueOf(st.charAt(i));
		}
		for(int i=6;i<13;i++){
			b+=String.valueOf(st.charAt(i));
		}
		for(int i=14;i<19;i++){
			c+=String.valueOf(st.charAt(i));
		}
		System.out.println(a+" "+b+" "+c);
	}
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

string S;

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>S;
	S[5]=S[13]=' ';
	cout<<S<<endl;
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n';
	FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	solve(); return 0;
}
//  [cpp]
/*
Date: 2017/01/07 19:53:21 Saturday
*/
#include<bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define mp make_pair
#define pb push_back
#define rep(i,a,n) for(int i=(a);i<=(n);++i)
#define dep(i,a,n) for(int i=(a);i>=(n);--i)
#define eps 1e-8
#define pi 3.1415926535897
#define sqr(x) ((x)*(x))
#define MAX(a,b) a=max(a,b)
#define MIN(a,b) a=min(a,b)
#define SZ(x) ((int)(x).size())
#define CPY(a,b) memcpy(a,b,sizeof(a))
#define CLR(a) memset(a,0,sizeof(a))
#define POSIN(x,y) (1<=(x)&&(x)<=n&&1<=(y)&&(y)<=m)
#define all(x) (x).begin(),(x).end()
#define COUT(S,x) cout<<fixed<<setprecision(x)<<S<<endl
#define buli(x) (__builtin_popcountll(x))
#define bur0(x) (__builtin_ctzll(x))
#define bul2(x) (63-__builtin_clzll(x))
#define pw(x) ((ll(1))<<(x))
#define upmo(a,b) (((a)=((a)+(b))%mo)<0?(a)+=mo:(a))
#define mmo(a,b) (((a)=1ll*(a)*(b)%mo)<0?(a)+=mo:(a))
#define y0 y0z
#define y1 y1z
#define yn ynz
#define j0 j0z
#define j1 j1z
#define jn jnz
#define tm tmz
#ifdef LOCAL
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define debug(...) 
#endif
typedef long long ll;
typedef double lf;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<lf,lf> pff;
typedef complex<double> CD;
const int inf=0x3f3f3f3f;
const int mo=1000000007;
inline void gn(long long&x){
	int sg=1;char c;while(((c=getchar())<'0'||c>'9')&&c!='-');c=='-'?(sg=-1,x=0):(x=c-'0');
	while((c=getchar())>='0'&&c<='9')x=x*10+c-'0';x*=sg;
}
inline void gn(int&x){long long t;gn(t);x=t;}
inline void gn(unsigned long long&x){long long t;gn(t);x=t;}
inline void gn(double&x){double t;scanf("%lf",&t);x=t;}
inline void gn(long double&x){double t;scanf("%lf",&t);x=t;}
template<class T1,class T2>inline void gn(T1&r,T2&s){gn(r),gn(s);}
template<class T1,class T2,class T3>inline void gn(T1&r,T2&s,T3&t){gn(r),gn(s),gn(t);}
template<class T1,class T2,class T3,class T4>inline void gn(T1&r,T2&s,T3&t,T4&u){gn(r),gn(s),gn(t),gn(u);}
inline void gs(char *s){scanf("%s",s);}
inline void gc(char &c){while((c=getchar())>126 || c<33);}
inline void pc(char c){putchar(c);}
const int DX[]={1,0,-1,0},DY[]={0,1,0,-1};
ll powmod(ll a,ll b) {ll res=1;a%=mo;for(;b;b>>=1){if(b&1)res=res*a%mo;a=a*a%mo;}return res;}
ll powmod(ll a,ll b,ll mo) {ll res=1;a%=mo;for(;b;b>>=1){if(b&1)res=res*a%mo;a=a*a%mo;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
//*******************************************

const int N=111111,M=111111;
int l,m,n,t,C;
char s[N];
int main(){
#ifdef LOCAL
	freopen("A.in","r",stdin);//freopen("A.out","w",stdout);
#endif
	scanf("%s",s);
	n=strlen(s);
	rep(i,0,n-1)if(s[i]==',')s[i]=' ';
	printf("%s\n",s);
	return 0;
}
//  [cpp]
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
#include <random>
using namespace std;

#define rep(i, N) for (int i = 0; i < N; i++)
#define pb push_back

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<int, ll> i_ll;
typedef pair<ll, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<ll, ll> ll_ll;
typedef pair<double, double> d_d;
struct edge { int u, v; ll w; };

ll MOD = 1000000007;
ll _MOD = 1000000009;
int INF = INT_MAX / 10;
double EPS = 1e-10;
double PI2 = M_PI * 2;

int main() {
	string s; cin >> s;
	s[5] = s[13] = ' ';
	cout << s << endl;
}
//  [c]
#include<stdio.h>
#include<string.h>
int main()
{
    char S[19]={};
    int i;
    scanf("%s",&S);
    for(i=0;i<19;i++){
    if('a'<=S[i] && S[i]<='z'){
        if(S[5]==',' && S[13]==','){
            S[5]=' ';
            S[13]=' ';
        }
    }
}
printf("%s",S);
return 0;
}
//  [c]
#include<stdio.h>

int main(){
    int i=0;
    char s[19];

    scanf("%s", s);
  
    for(;i<19;i++){
      if(s[i] == ','){
        s[i] = ' ';
      }
    }

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

    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>

int main(void){

    char s[20];

    scanf("%s", s);

    for(int i = 0; i < 19; i++){
        if(s[i] == ','){
            printf(" ");
        }else{
            printf("%c", s[i]);
        }
    }
    printf("\n");

    return 0;
}
//  [javascript]
function main(input) {
  const S = input;
  let ans = S.split(',').join(' ');
  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input){
    input = input.split(',')
    input = input.join(' ')
    console.log(input)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
'use strict'

const main = (input) => {
    const s = input.split('\n')[0]
    console.log(s.replace(/,/g, ' '))
}

main(require('fs').readFileSync('/dev/stdin', 'utf-8'))
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	var (
		s string
	)
	fmt.Scan(&s)
	ans := strings.ReplaceAll(s, ",", " ")
	fmt.Println(ans)
}
//  [go]
package main

import (
  "fmt"
  "strings"
)

func main() {
  var s string
  
  fmt.Scanf("%s", &s)
  
  fmt.Print(strings.Replace(s, ",", " ", 2))
}
//  [ruby]
puts gets.chomp.split(',').join(' ')
//  [ruby]
puts gets.gsub(',',' ')
//  [ruby]
s = gets.chomp
puts s.split(",").join(" ")
//  [rust]
#![allow(unused_imports)]
// use itertools::Itertools;
use proconio::{input, marker::*};

fn main() {
    input! {
        s: Chars
    };
    let mut rs = String::new();
    for c in s {
        rs.push(match c {
            ',' => ' ',
            _ => c,
        });
    }
    println!("{}", rs);
}
//  [rust]
use std::io;

fn main() {
    let mut input_line:String = String::new();
    io::stdin().read_line(&mut input_line).expect("err");

//    let inputs: Vec<&str> = input_line.split_whitespace().collect();
    let inputs: Vec<&str> = input_line.split(",").collect();
    
    print!("{} {} {}",inputs[0], inputs[1], inputs[2])    
}
//  [swift]
// Haiku

print(readLine()!.split(separator: ",").joined(separator: " "))
//  [typescript]
import * as fs from 'fs';
const input = fs.readFileSync("/dev/stdin", "utf8");
// 

const r = input.replace(/,/g, " ");


console.log(r);
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const s = stdin.split('\n')[0]

console.log(s.split(',').join(' '))
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const s = input[0][0];

  return s.replace(/,/g, " ");
};

console.log(main(read()));
//  [python]
#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect, fractions
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

a,b,c=map(int,input().split())
for i in itertools.permutations([a,b,c],3):
    if i[0]==sum(i[1:]) or sum(i[:2])==i[2]:
        print("Yes")
        exit()

print("No")
//  [python]
def main():
    candy = [int(cn) for cn in input().split()]
    candy.sort()
    print('Yes' if candy[0] + candy[1] == candy[2] else 'No')


if __name__ == '__main__':
    main()
//  [python]
#!/usr/bin/env python3
import sys, itertools ,fractions
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0



a, b, c = map(int, input().split())
for i in itertools.permutations([a, b, c], 3):
    if i[0] == sum(i[1:]) or sum(i[:2]) == i[2]:
        print("Yes")
        exit()

print("No")
//  [java]
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int[] candy = new int[3];
		int a=sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		candy[0]=a;
		candy[1]=b;
		candy[2]=c;
		Arrays.sort(candy);
		if (candy[2]==candy[0]+candy[1]){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	}

}
//  [java]
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);

    	int a = sc.nextInt(),
    		b = sc.nextInt(),
    		c = sc.nextInt();
    	
    	if((a + b) == c || (b + c) == a || (c + a) == b)	System.out.println("Yes");
    	else												System.out.println("No");
    }
}
//  [java]
import java.util.Arrays;
import java.util.Scanner;

public class Main{
	
	static final Scanner s=new Scanner(System.in);
	
	public static void main(String[] __){
		int
		in[]={s.nextInt(),s.nextInt(),s.nextInt()},
		sum=Arrays.stream(in).sum();
		
		System.out.println(sum%2==0&&Arrays.stream(in).anyMatch(i->i==sum/2)?"Yes":"No");
	}
}
//  [cpp]
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>

using namespace std ;

 
int main()
{
	ios::sync_with_stdio(false) ;

	vector<int> v(3) ;

	cin >> v[0] >> v[1] >> v[2] ;

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

	if(v[2] == v[0]+v[1])
		cout << "Yes" ;
	else
		cout << "No" ;

	
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int a[3] = {0};
	rep (i, 3) cin >> a[i];
	sort (a, a + 3);

	cout << (a[0] + a[1] == a[2] || a[0] == a[1] + a[2] ? "Yes" : "No") << endl;
	
	return 0;
}
//  [cpp]
#include <cstdio>
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <string>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <functional>
#include <queue>
#include <stack>
#include <cmath>
#include <iomanip>
#include <list>
#include <tuple>
#include <bitset>
#include <ciso646>
#include <cassert>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> T;
typedef vector<ll> vec;

inline bool check(ll x, ll y, ll xMax, ll yMax) { return x >= 0 && y >= 0 && xMax > x && yMax > y; }
inline int toint(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string tostring(T x) { ostringstream sout; sout << x; return sout.str(); }
template<class T> inline T sqr(T x) { return x*x; }
template<class T> inline T mypow(T x, ll n) { T res = 1; while (n > 0) { if (n & 1)res = res * x;	x = x * x;	n >>= 1; }return res; }
inline ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

#define For(i,a,b)	for(ll (i) = (a);i < (b);(i)++)
#define rep(i,n)	For(i,0,n)
#define rFor(i,a,b)	for(ll (i) = (a-1);i >= (b);(i)--)
#define rrep(i,n)	rFor(i,n,0)
#define each(i,n)	for(auto &i : n)
#define clr(a)		memset((a), 0 ,sizeof(a))
#define mclr(a)		memset((a), -1 ,sizeof(a))
#define all(a)		(a).begin(),(a).end()
#define sz(a)		(sizeof(a))
#define tostr(a)	tostring(a)
#define dump(val) 	cerr << #val " = " << val << endl;
#define Fill(a,v)	fill((int*)a,(int*)(a+(sz(a)/sz(*(a)))),v)

const ll dx[8] = { 1, 0, -1, 0, 1, 1, -1, -1 }, dy[8] = { 0, -1, 0, 1, -1, 1, -1, 1 };

const ll mod = 1e9 + 7;
const ll INF = 1e17 + 9;

#define int ll
#define double ld

signed main() {
	cin.tie(0);
	ios_base::sync_with_stdio(false);

	int a, b, c;
	cin >> a >> b >> c;

	rep(i, 2) {
		rep(j, 2) {
			rep(k, 2) {
				int A = 0, B = 0;
				if (i)A += a; else B += a;
				if (j)A += b; else B += b;
				if (k)A += c; else B += c;
				if (A == B) {
					cout << "Yes" << endl; return 0;
				}
			}
		}
	}
	cout << "No" << endl;

	return 0;
}
//  [c]
#include <stdio.h>

int main(void){
  int a,b,c;
  int result;
  
  scanf("%d%d%d",&a,&b,&c);
  
  
  if((a==b+c)||
     (b==a+c)||
     (c==a+b))
  {
    printf("Yes\n");
  }
  else{
    printf("No\n");
  }
  return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>

int main(){
  int a,b,c,m;
  scanf("%d %d %d",&a,&b,&c);
  m=a;
  if(m<b) m=b;
  if(m<c) m=c;
  if(a+b+c==2*m)printf("Yes\n");
  else printf("No\n");
  return 0;
}
//  [c]
 #include<stdio.h>
 int main(void)
 {
     int a,b,c;
   
     scanf("%d%d%d",&a,&b,&c);
   
     if(a+b==c) printf("Yes\n");
     else if(b+c==a) printf("Yes\n");
     else if(c+a==b) printf("Yes\n");
     else printf("No\n");
   
     return 0;
 }
//  [javascript]
function main(a){
	a = a.split(" ");
	a=stn(a);
	if(a[0]+a[1]==a[2]||a[1]+a[2]==a[0]||a[0]+a[2]==a[1]){
		op("Yes");
	}else{
		op("No");
	}
}
function op(a){
	console.log(a);
}
function stn(a){
		return a.map(function(x){return parseInt(x,10);});
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
"use strict";
    
const main = arg => {
    const packs = arg.split("\n")[0].split(" ").map(n=>parseInt(n)).sort((a,b)=>b-a);
    console.log(packs[0] === packs[1] + packs[2] ? "Yes" : "No");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
  input = input.trim();
  const [a,b,c] = input.split(' ').map(Number);
  i_max = Math.max(a,b,c)
  i_sum = a+b+c
  console.log((i_max*2==i_sum) ? 'Yes' : 'No');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import "fmt"

func main() {
	// Code for A - Fighting over Candies
	var a, b, c int
	fmt.Scanf("%d %d %d", &a, &b, &c)
	if a+b == c || b+c == a || c+a == b {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func Scanner() string {
	sc.Scan()
	return sc.Text()
}

func intScanner() int {
	n, _ := strconv.Atoi(Scanner())
	return n
}

func floatScanner() float64 {
	n, _ := strconv.ParseFloat(Scanner(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func stringSliceScanner(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scanner()
	}
	return a
}
func intSliceScanner(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = intScanner()
	}
	return a
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	a, b, c := intScanner(), intScanner(), intScanner()
	if a+b+c-max([]int{a, b, c}) == max([]int{a, b, c}) {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [ruby]
a=gets.split.map(&:to_i)
puts a.find_index(a.sum/2.to_f) ? "Yes" : "No"
//  [ruby]
list = gets().chomp.split("\s").map{|x| x.to_i}

list = list.sort()

puts list[0] + list[1] == list[2] ? 'Yes' : 'No'
//  [ruby]
a, b, c = gets.split.map(&:to_i)
if a + b == c or b + c == a or c + a == b
  puts :Yes
else
  puts :No
end
//  [rust]
#![allow(non_snake_case)]
use proconio::input;
// use std::collections::HashMap;

fn main() {
    input! {
        A: i64,
        B: i64,
        C: i64,
    }

    let ans = if A + B == C || A + C == B || B + C == A {
        "Yes"
    } else {
        "No"
    };

    println!("{}", ans);
}
//  [rust]
#![allow(unused_imports)]

use text_io::*;
use proconio::*;
use std::collections::*;
use std::process::exit;
use std::cmp::*;
use itertools::Itertools;

fn main() {
    input! {
    a:isize,
    b:isize,
    c:isize,
    }
    println!("{}",if a+b+c-max(a,max(b,c))==max(a,max(b,c)){"Yes"}else{"No"})
}
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const packs = input[0].map(Number);

  packs.sort((a, b) => a - b);

  return packs[0] + packs[1] === packs[2] ? "Yes" : "No";
};

console.log(main(read()));
//  [typescript]
import * as fs from "fs"

function Main(input: string) {
  const [a, b, c] = input.split(" ").map(num => parseInt(num, 10)).sort((a, b) => a - b)

  if (a + b === c) {
    console.log("Yes")
  }
  else {
    console.log("No")
  }
}

fs.readFile('/dev/stdin', (err, data) => {
  if(err){
    Main(fs.readFileSync('./input.txt', 'utf8'))
    return false
  }
  Main(data.toString())
})
//  [typescript]
import * as fs from "fs"

function Main(input: string) {
  const [a, b, c] = input.split(" ").map(num => parseInt(num, 10)).sort((a, b) => a - b)

  if (a + b === c) {
    console.log("Yes")
  }
  else {
    console.log("No")
  }
}


fs.readFile('/dev/stdin', (err, data) => {
  if(err){
    Main(fs.readFileSync('./input.txt', 'utf8'))
    return false
  }
  Main(data.toString())
  return false
})
//  [python]
n, l = map(int, input().split(' '))
s = [input() for i in range(n)]

s.sort()
for t in s:
    print(t, end='')
print()
//  [python]
catch = input()
catch = catch.split(" ")
N = int(catch[0])

S = []

for i in range(N):
    S.append(input())

S.sort()

for i in range(N):
    print(S[i], end = "")

print()
//  [python]
N,L=map(int,input().split())
# N,L= 3,3
strs=[input() for i in range(N)]
# strs=["dkx","acx","axx"]
out=""
for s in sorted(strs):
	out+=s
print(out)
//  [java]
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	static PrintWriter out = new PrintWriter(System.out);
	public static void main(String[] args) {
		// 入力
		final int n, l;
		final String[] s;
		try(Scanner scan = new Scanner(System.in)) {
			n = scan.nextInt();
			l = scan.nextInt();
			s = new String[n];
			for (int i = 0; i < n; i++) {
				s[i] = scan.next();
			}
			
		}
		Arrays.sort(s);
		
		// 出力
		Arrays.stream(s).forEach(out::print);
		out.println();
		out.flush();
	}

}
//  [java]
import java.util.*;
public class Main {
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int l = sc.nextInt();
	String[] s = new String[101];
	String stemp;
	int i,j;

	for (i=1;i<=n;i++){
	    s[i] =  sc.next();
	}

	for(i=1;i<=n;i++){
	    for(j=i+1;j<=n;j++){
		if (s[i].compareTo(s[j]) > 0){
		    stemp = s[i];
		    s[i]  = s[j];
		    s[j]  = stemp;
		}
	    }
	}

	for (i=1;i<=n;i++){
	    System.out.print(s[i]);
	}
	System.out.println("");
    }
}
//  [java]
import java.util.ArrayList;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int nS = in.nextInt();
		int len = in.nextInt();
		ArrayList<String> arr = new ArrayList<>();
		for(int i = 0; i < nS; i++) {
			arr.add(in.next());
		}
		arr.sort((o1, o2)->(o1.compareTo(o2)));
		for(int i = 0; i < nS; i++) {
			System.out.print(arr.get(i));
		}
		in.close();
	}
}
//  [cpp]
#include<bits/stdc++.h>
#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 PII pair<int,int>
#define PLL pair<LL,LL>
#define VI vector<int>
#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 fi first
#define se 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');
}
LL t,n,m,ans;

struct TT{
	string s;
}ff[111];
bool cmp(TT a,TT b){
	return a.s+b.s<b.s+a.s;
}
void solve_cplusplus(){
	LL i,j,k,l,res;
	cin>>n>>m;
	for(i=0;i<n;i++)cin>>ff[i].s;
	sort(ff,ff+n,cmp);
	for(i=0;i<n;i++)cout<<ff[i].s;
	puts("");
}

struct str{
	char s[111];
}ss[111];
bool cmp2(str a,str b){
	return strcmp(a.s,b.s)<0;
}
void solve_c(){
	LL i,j,k,l,res;
	scanf("%d%d",&n,&m);
	for(i=0;i<n;i++)scanf("%s",&ss[i].s);
	sort(ss,ss+n,cmp2);
	for(i=0;i<n;i++)printf("%s",ss[i].s);
	puts("");
}
int main()
{
//	solve_cplusplus();
	solve_c();
	return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
int main(void){
    int n,l;
    char **s;
    //char *com;
    //int yoso=0;
    int k;
    k=scanf("%d %d",&n,&l);
    s=calloc(n,sizeof(char*));
    for(int i=0;i<n;i++){
        s[i]=calloc(l+1,sizeof(char));
    }
    for(int i=0;i<n;i++){
      k=  scanf("%s",s[i]);
    }
    //com=calloc(l*n+1,sizeof(char));
    //com[l*n]='\0';
    int min;
    for(int c=0;c<n;c++){
        min=c;
        for(int a=c+1;a<n;a++){
            for(int i=0;i<l;i++){
                int flag=0;
                for(int j=0;j<i;j++){
                    if(s[min][j]==s[a][j]) flag++;
                }
                if((flag==i)&&(s[a][i]<s[min][i])){
                    min=a;
                }
            }
        }/*
        for(int i=0;i<l;i++){
                com[yoso++]=s[m][i];
        }*/
        printf("%s",s[min]);
        char sss[l+1];sss[l]='\0';
        for(int i=0;i<l;i++){
            sss[i]=s[c][i];
        }
        for(int i=0;i<l;i++){
            s[c][i]=s[min][i];
        }
        for(int i=0;i<l;i++){
            s[min][i]=sss[i];
        }
    }
    //printf("%s",com);

    free(s);
  //  free(com);
    printf("\n");
    return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int sort_strings(int N, int L, char String[128][128]) {
//int sort_strings(int N, int L, char **String) {
	int i, j;
	int sorted;
	char *temp;
	char a[128];

	sorted = 0;
	while(sorted < N - 1) {
		sorted = 0;
		for(i = 0; i < N - 1; i += 1) {
			for(j = 0; j < L; j += 1) {
				if(String[i][j] > String[i + 1][j]) {
					//switch
					sprintf(a, "%s", String[i]);
					sprintf(String[i], "%s", String[i + 1]);
					sprintf(String[i + 1], "%s", a);
					break;
				} else if(String[i][j] == String[i + 1][j]) {
					if(j == L - 1) {
						sorted += 1;
					}
					continue;
				} else {
					sorted += 1;
					break;	
				}
			}
		}
	}
	return 0;
}

int main(void) {
	int i;
	int N, L;
	char String[128][128];
	char result[16384];
	char buf[128], *ch;

	fgets(buf, sizeof(buf), stdin);
	ch = strtok(buf, " ");
	N = atoi(ch);
	ch = strtok(NULL, " ");
	L = atoi(ch);

	for(i = 0; i < N; i += 1) {
		String[i][0] = '0';
	}

	for(i = 0; i < N; i += 1) {
		fgets(buf, sizeof(buf), stdin);
		sprintf(String[i], "%s", strtok(buf, " "));
	}
	sort_strings(N, L, String);

	for(i = 0; i < N; i += 1) {
		sprintf(&(result[i * L]), "%s", String[i]);
	}
	printf("%s\n", result);

	return 0;
}
//  [c]
#include<stdio.h>
#include<string.h>

int main()
{
  int n,l;
  char s[101][101];
  int i,j;
  char t[101];
  scanf("%d%d",&n,&l);
  for(i=0;i<n;i++){
    scanf("%s",s[i]); 
  }
  for(i=0;i<n;i++){
    for(j=0;j<n;j++){
      strcpy(t,s[i]);
      if(strcmp(s[i],s[j])<0){
        strcpy(s[i],s[j]);
        strcpy(s[j],t);
      }
    }
  }
  for(i=0;i<n;i++){
    printf("%s",s[i]);
  }
  return 0;
}
//  [javascript]

let _inputLines;
let _lineNumber = 0;
let inputReader = _inputReader ();

function _main() {
	
	_inputLines = _inputData.trim().split('\n').map((string) => {
		return string.trim();
	});;
	
	let [a, b] = inputReader.readArray();
	//console.log(typeof c);
	a = parseInt(a);
	b = parseInt(b);
	//c = parseInt(c);
	let arr = [];
	for(let i=0;i<a;i++){
		let str = inputReader.readLine();
		arr.push(str);
	} 
	arr.sort();
	let res='';
	for (let array of arr){
		res+=array;
	} 
	console.log(res);
	
	
	// let input = inputReader.readLine().split(' ');
	// let a = input[0];
	// let b = input[1];
	// //let b = inputReader.readLine().split('');
	// //console.log(a,b);
	
	// let res = '';
	// for(let i=0;i<size;i++){
	//     res +=a[i];
	//     res+=b[i];
	// }
	// console.log(res);
	
	//console.log(noOfTestCases,typeof noOfTestCases);
	// while(noOfTestCases--){
	//     let [a,b] = inputReader.readNumberArray();
	//     let count = 1;
	//     if(a<=2){
	//         console.log(1);
	//         continue;
	//     }
	//     let floor;
	//     if((a-2)%b===0)
	//         floor = (a-2)/b +1;
	//     else
	//          floor = Math.ceil((a-2)/b)+1;
	//     console.log(floor);
	
	// }

}

var _inputData = '';
function cacheInput(data) {
	_inputData += data;
}

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', cacheInput).on('end', _main);

function _inputReader () {
	function readArray() {
		return _inputLines[_lineNumber++].split(' ');
	}
		
	function readLine(){
		return _inputLines[_lineNumber++];
	}
		
	function readNumberArray(){
		return _inputLines[_lineNumber++].split(' ').map(val => Number(val));
	}
		
	
	return {
		readArray,
		readLine,
		readNumberArray,
	}
}
//  [javascript]
function Main(input) {
  var s = input.split("\n").slice(1).map(e => e).sort().join("");
  console.log(s);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"fmt"
	"sort"
)

func main() {
	var n, l int
	fmt.Scan(&n, &l)

	s := make([]string, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&s[i])
	}

	sort.Strings(s)

	for j := 0; j < n; j++ {
		fmt.Print(s[j])
	}
	fmt.Println()
}
//  [go]
package main

import (
	"fmt"
	"sort"
	"strings"
)

func main() {
	var length, n int
	fmt.Scan(&n, &length)
	var s []string
	var tmp string
	for i := 0; i < n; i++ {
		fmt.Scan(&tmp)
		s = append(s, tmp)
	}
	sort.Strings(s)
	fmt.Println(strings.Join(s, ""))
}
//  [ruby]
require 'pp'
$DEBUG ? define_method(:dpp){|e|pp e} : define_method(:dpp){|e|}

# 空白区切の入力値を数値の配列で返却する
def gets_i_list()
  gets.chomp.split(" ").map(&:to_i)
end

# 入力値を文字列で返却する
def gets_s()
  gets.chomp
end

n, l = gets_i_list
slist = []

n.times do
  slist.push gets_s
end

puts slist.sort.join
//  [ruby]
n, l = gets.split.map(&:to_i)

arr = []
n.times do
  arr << gets.chomp
end

puts arr.sort.join
//  [ruby]
n,l = gets.strip.split.map(&:to_i)
str = []
n.times do
  str << gets.strip.to_s
end
strs = str.sort
puts strs.join("")
//  [rust]
use proconio::input;

fn main() {
    input! {
        n: usize,
        _l: usize,
    }

    let mut s: Vec<String> = Vec::new();
    for _ in 0..n {
        input! {
            t: String,
        }
        s.push(t);
    }

    s.sort();
    for i in 0..n {
        print!("{}", s[i]);
    }
    println!("");
}
//  [rust]
fn main() {
    proconio::input! {
        n: usize,
        _l: usize,
        mut ss: [String; n],
    }
    ss.sort();
    let ans = ss.join("");
    println!("{}", ans);
}
//  [rust]
#![allow(unused_imports)]
use itertools::Itertools;
use proconio::{input, marker::*};

fn main() {
    input! {
        n: usize,
        _l: usize,
        mut ss: [String; n]
    };
    ss.sort();
    println!("{}", ss.iter().join(""));
}
//  [swift]
            let data = readLine()!
            let values = data.characters.split{ x in x == " "}.map{Int(String($0))!}
            let N = values[0]

            var S = [String]()
            (0 ..< N).forEach { (i) in
                S.append(readLine()!)
            }
            S.sortInPlace()

            print(S.reduce("", combine: +))
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
func exponentiate(lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/



/*************** メインプログラム ***************/

let input = readIntSplit(by: " ")
let (N, L) = (input[0], input[1])
var S = [String]()
for _ in 0..<N {
    S += [readLine()!]
}
print(S.sorted().joinWithSeparator(""))
//  [swift]
var _=readLine()!,S=[""];while let s=readLine(){S+=[s]};print(S.sort().joinWithSeparator(""))
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const S = input.slice(1, -1).map((line) => line[0]);

  S.sort();

  return S.join("");
};

console.log(main(read()));
//  [typescript]
const log = console.log;

const parseLines = (s: string) => s.trim().split("\n");

const dictionarySorter = (strA: string, strB: string) =>
  strA.localeCompare(strB);

// ----

function Main(input: string): void {
  const [head, ...s] = parseLines(input);

  s.sort(dictionarySorter);

  log(s.join(""));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))}
const main=()=>{
  let n=tn(),m=tn(),sr=tss(n)
  for(let k=0;k<n;k++){
    for(let i=n-1;i>=1;i--){
      if(sr[i-1]>sr[i])[sr[i-1],sr[i]]=[sr[i],sr[i-1]]
    }
  }
  to(sr.join(''))
}
main()
//  [python]
s=list(input())
dp = [0]*(len(s)+1)
for i in range(len(s)):
    if s[i] in 'ACGT':
        dp[i] += 1
        dp[i+1] += dp[i]
    else:
        dp[i]=0
print(max(dp))
//  [python]
S = input()
L = ["A", "C", "G", "T"]

max_ = 0
cnt = 0
f = False
for n in range(len(S)):
    if (not f) and S[n] in L:
       cnt = 1
       f = True
    elif not f:
        pass
    elif f and S[n] in L:
        cnt += 1
    else:
        max_ = max(max_, cnt)
        cnt = 0
        f = False

print (max(max_, cnt))
//  [python]
S = input()
ACGT = ['A', 'C', 'G', 'T']
count = 0
max_count = 0
for w in S:
    if w in ACGT:
        count += 1
    if count > max_count:
        max_count = count
    if w not in ACGT:
        count = 0
print(max_count)
//  [python]
import re
import numpy as np
s = input()
atgcs = re.split(r'[^ATGC]', s)
lens = np.array(list(map(len, atgcs))).max()
print(lens)
//  [python]
import numpy as np
import sys

S = input()

p = -1
length = 0
for i in range(len(S)):
    if S[i] in ["A","T","G","C"]:

        if i-p > length:
            length = i-p
    else:
        p = i
print(length)
//  [python]
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = s_inpl()   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import math
import numpy as np
import copy
from collections import defaultdict, Counter
from itertools import product
from bisect import bisect_left, bisect_right

def s_inpl(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))

S = input()

ans = 0
tmp = 0
for si in S:
    if si == "A" or si == "T" or si == "C" or si == "G":
        tmp += 1
    else:
        if tmp > ans:
            ans = tmp

        tmp = 0
    if tmp > ans:
        ans = tmp

print(ans)
//  [java]
import java.io.*;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    char[] t = br.readLine().toCharArray();
    
    int result = 0;
    int temp = 0;
    for (char c : t){
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    }
    System.out.println(result);
  }
}
//  [java]
import java.util.*;
import java.io.*;

public class Main {
 
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        String s = sc.next();
        int n = s.length();
        int[] result = new int[n]; 
        for (int i = 0; i < n; i++) {
            result[i] = 0;
            for (int j = 0; j < n-i; j++) {
                if ((s.charAt(i+j) == 'A' || s.charAt(i+j) == 'C') || (s.charAt(i+j) == 'G' || s.charAt(i+j) == 'T')) {
                    result[i]++;
                } else break;
            }
        }
        int max = 0;
        for (int i = 0; i < n; i++) {
            max = Math.max(max, result[i]);
        }
        System.out.println(max);
    }
}


class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    
    public boolean hasNext() { 
        while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();
    }
    
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}
//  [java]
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        int ans = Arrays.stream(S.split("[^ACGT]"))
                .mapToInt(String::length)
                .max()
                .orElse(0);
        System.out.println(ans);
    }
}
//  [java]
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String S = scan.nextLine();

    List<Character> list = new ArrayList<>();
    List<Integer> result = new ArrayList<>();


    for (int i = 0; i < S.length(); i++) {
      switch (S.charAt(i)) {
        case 'A':
        case 'T':
        case 'C':
        case 'G':
          list.add(S.charAt(i));
          break;
        default:
          if (!list.isEmpty()) {
            result.add(list.size());
            list = new ArrayList<>();
          }
          break;
      }
    }
    if (!list.isEmpty()) {
      result.add(list.size());
    }
    if (result.isEmpty()) {
      System.out.println(0);
    } else {
      System.out.println(result.stream().max((a, b) -> a.compareTo(b)).get());
    }
  }
}
//  [java]
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        int maxlength = 0;
        int count = 0;
        for(int i = 0; i < a.length(); i++) {
            if (containACGT(a.charAt(i))) {
                count++;
                if (maxlength < count) {
                    maxlength = count;
                }
                continue;
            }
            count = 0;
        }
        System.out.println(maxlength);
    }

    private static Boolean containACGT(char c) {
        if (Arrays.stream("ACGT".split("")).anyMatch(s -> s.contains(Character.toString(c)))) {
            return true;
        }
        return false;
    }
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

int main() { 
	string S;
  cin >> S;
  int f=0;
  int bi =0;
  for(int i=0;i<S.size();i++){
    if(S.at(i)=='A'||S.at(i)=='G'||S.at(i)=='T'||S.at(i)=='C'){
    f++;
    }else{
    	if(bi<f){
          bi=f;
        }
      f=0;
    }
  }
      	if(bi<f){
          bi=f;
        }

  cout << bi << endl;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
int main(){
	string s;
	cin >> s;
	int x = 0, maxi = 0;
	for(int i = 0; i < (int)s.size(); i++){
		if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T')
			x ++;
		else
			x = 0;
		maxi = max(maxi, x);
	}
	cout << maxi;
}
//  [cpp]
#include <algorithm>
#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<string>

#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<limits.h>

using namespace std;
int main(){
  string s;
  char acgt[4];
  int max = 0,cur=0,ii;

  cin >> s;

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

    if(s[ii] == 'A'||
       s[ii] == 'C'||
       s[ii] == 'G'||
       s[ii] == 'T'){
      cur++;
    }
    else{
      cur =0;
    }
    if(cur >= max){
      max = cur;
    }
  }
  cout << max << endl;
  return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define str string

ll MOD = 1000000007,INFL = 1ll << 60,INF = 1 << 30;
pair <ll, ll> A[10000000] = {}, X[1000000] = {};
int dy[]={0, 0, 1, -1},dx[]={1, -1, 0, 0};
vector <ll> v;
ll a = 0,m = 0,c = 0,n = 0,sum = 0, max = INF;
str S;
int ans = 0;

int findDigits(int n) {
        int i = 0;
        while (n > 0) {

                sum += n%10;
                n /= 10;
                i++;
        }
        return i;
}


int main(){
        cin.tie(0);
        ios::sync_with_stdio(false);
        //Code Line

cin >> S;
for(int i = 0;i < S.size();i++){
  if(S[i]== 'A' || S[i]== 'T'|| S[i]== 'G' || S[i]== 'C'){
    ans++;
    if(a < ans)a = ans;
  }
  else {
    if(a < ans)a = ans;
    ans = 0;
  }
}
cout << a << endl;
  //Code Line
        return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
 
#define REP(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define REPS(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define RREP(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define RREPS(i, n) for (int i = ((int)(n)); i > 0; i--)
#define IREP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define IREPS(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define FOR(e, c) for (auto &e : c)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define RVISORT(v) sort(v.begin(), v.end(), greater<int>());
#define ALL(v) v.begin(), v.end()
#define MP(n, m) make_pair(n, m);
#define COUT(d) cout<<std::setprecision(10)<<d<<endl;
#define CIN(n) getline(cin,n);
 
using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using ll = long long;
using ul = unsigned long;
 
typedef long long ll;
 
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }
 
const int mod=1e9+7;
 
struct mint {
  ll x;
  mint(ll x=0):x(x%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
};
 
mint c[4005][4005];
void init() {
  c[0][0] = 1;
  for (int i = 0; i <= 4000; i++) {
    for (int j = 0; j <= i; j++) {
      c[i+1][j] += c[i][j];
      c[i+1][j+1] += c[i][j];
    }
  }
}
mint comb(int n, int k) {
  return c[n][k];
}
 
bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false;
 
    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }
 
    return true;
}
 
map<ll, ll> primeFact(ll n) {
  map<ll, ll> res;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      res[i]++;
      n /= i;
    }
  }
  if (n != 1) res[n]++;
  return res;
}
 
void printv(VI& v){
  REP(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
 
int vtotal(VI& v){
  int total=0;
  REP(i,v.size()) total+=v[i];
  return total;
}
 
int main()
{
  cin.tie( 0 );
  ios::sync_with_stdio( false );
	
  //init(); // mint初期化
  string s;
  cin>>s;
  int n=s.size();
  int ans=0;
  int count=0;
  REP(i,n){
    if(s[i]!='A'&&s[i]!='C'&&s[i]!='G'&&s[i]!='T'){
        if(ans<count)ans=count;
        count=0;
        continue;
    }
    count++;
  }
  if(ans<count)ans=count;
  cout<<ans<<endl;
  return 0;
}
//  [cpp]
#include<iostream>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <iomanip>//setprecision
#include<math.h>
#include <functional>
#include<climits>
using namespace std;
#define ll  long long 
#define rep(i, n)        for(ll i=0; i<(ll)(n); ++i)
#define mod 1000000007
  vector<ll>to[1000005];
   ll dp[2000000];
 int gcd(int a, int b)
{
  if (a%b == 0)
{
return(b);
}
else
{
return(gcd(b,a%b));
}
}
  vector<vector<bool>>d(5001,vector<bool>(5001));
int main(){
  string a;cin>>a;
  ll ans=0;
  for(ll i=0;i<a.size();i++){
    for(ll o=0;o<a.size()-i;o++){
      ll b=0;
      for(ll j=i;j<a.size()-o;j++){
        b++;
        if(a[j]!='A'&&a[j]!='T'&&a[j]!='C'&&a[j]!='G'){
          b=0;
          break;
        }
      }
      ans=max(ans,b);
    }
  }
  cout<<ans;
}