import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args){
Scanner cin=new Scanner(System.in);
int n=cin.nextInt();
for(int i=0;i<n;i++)
{
String s=cin.next();
System.out.print(s.substring(0,1).toUpperCase());
System.out.print(s.substring(1).toLowerCase());
System.out.println();
}
}
}
注意
字符串善用substring()方法替代循环